faustf Posted January 6, 2019 Share Posted January 6, 2019 hi guys i start to study , a dllcall , i have a program metatrader 4 is program for work in stock exchange i want interaact with them , and autoit. for do that i want use the program mt4gui , it is composed for 2 part one is .dll and one is .mqh library for metatrader , (the language of metatrader is mql4 is like c style) i trye to write a simple script for return a version but returnonly number 2 this is my script #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Array.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 623, 449, 192, 114) $Button1 = GUICtrlCreateButton("Button1", 272, 208, 75, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Global $DllPath="C:\Users\pc\AppData\Roaming\MetaQuotes\Terminal\B6FECCFE53E01D2BAC26AAD9B14029A8\MQL4\Libraries\" While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 Local $aResult = DllCall ($DllPath&"mt4gui2.dll","str","guiVersion") _ArrayDisplay ($aResult) EndSwitch WEnd the dll and mqh file is free dolodable of this link http://www.mt4gui.com/files/mt4gui26.rar the rar have password: fx1 http://www.mt4gui.com/files/mt4gui2.mqh this you can see a api call http://www.mt4gui.com/files/mt4gui-cheatsheet.pdf here you can download metatrader and create a demo account for testing https://download.mql5.com/cdn/web/metaquotes.software.corp/mt4/mt4setup.exe?utm_source=www.metatrader4.com&utm_campaign=download thankz At all Link to comment Share on other sites More sharing options...
Nine Posted January 6, 2019 Share Posted January 6, 2019 mt4gui2 - get version of mt4gui ! 2 seems to be right ? “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Danyfirex Posted January 6, 2019 Share Posted January 6, 2019 Is it Unicode DLL? Try to return wstr instead str. Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
faustf Posted January 6, 2019 Author Share Posted January 6, 2019 return an arry with number 2 in position 0 , i dont know if is unicode how is possible see ?? i suppose yes because the app is international thankz Link to comment Share on other sites More sharing options...
Danyfirex Posted January 7, 2019 Share Posted January 7, 2019 Local $aResult = DllCall ($DllPath&"mt4gui2.dll","wstr","guiVersion") Saludos faustf 1 Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
faustf Posted January 7, 2019 Author Share Posted January 7, 2019 Mito thankz Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now