Jump to content

dllcall how to use


 Share

Recommended Posts

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

Link to comment
Share on other sites

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...