| / | Forum |
|
draho
2007.11.28 09:30
Hello, I would like to use a DLL which includes some functions to work with POP3 protocol like Connect, Delete, Retrieve etc. I don't know how to define that DLL and those functions in MQL4 in order to get it work. Once it is defined and I am able to use those functions I am able to code what I need. I would very appreciate if anybody helps me start ! This is the link to the website with the description of the component http://www.pivo.com/doc/com/index.html because I don't even know whether it is possible to use this DLL in MQL4 environment. Thanks a lot in advance! |
|
I prefer using several Expert Advisors trading different currency pairs - this gives the effect of the multi-currency profile trading. |
|
irusoh1
2007.11.28 18:15
look at winuser32.mqh
|
|
phy
2007.11.28 20:54
MT4 includes a sample dll ... in the Samples folder... ... called Sample DLL ... |
|
draho
2007.11.29 08:02
Hello guys, I was actually trying to do it but no success....... I did the following: //+------------------------------------------------------------------+ #import "Pivo.Pop3.dll" //+------------------------------------------------------------------+ and then I don't know how to use it within 'int start()' #include <PivoDLLs.mqh> int start() } This is an example how to use it (from http://www.pivo.com/doc/com/index.html) [C#] here I am not sure how to define "email =new Pop3Main( );" so the Connect can be used in the code. I would appreciate any help Thanks |
|
phy
2007.11.29 08:43
Have you successfully built and run the Sample.DLL? C:\Program Files\MetaTrader\experts\samples\DLLSample You are trying to do things you can't do. MT4 will "call" the DLL, the DLL is permitted to return only a few types,
shown in ExpertSample.cpp You would do all the hard stuff in the DLL, and just return data to MT4, not a "mail object" . |
|
draho
2007.11.29 09:00
phy wrote:
Have you successfully built and run the Sample.DLL? C:\Program Files\MetaTrader\MetaTrader\experts\samples\DLLSample You are trying to do things you can't do with MT4. MT4 will "call" the DLL, the DLL is permitted to return only a few types, shown in ExpertSample.cpp You would do all the hard stuff in the DLL, and just return data to MT4, not a "mail object" . Hey phy, Yes I did try Sample.dll and it seemed not to be that difficult ;-) But, then I didn't know that I have to define an Object in order to use it. So you saying that I can't do it because objects are not possible to use in MT4, right? What would you recommend in my case? I need to retrieve an e-mail from POP3 account and use some info from it. The problem is to retrieve the e-mail ;-) Ok, thanks for your help and explanation. Bye |
|
phy
2007.11.29 09:38
"What would you recommend in my case? I need to retrieve an e-mail from POP3
Retrieve the Email using your DLL code and the Pivo objects. --------------------- MT4 triggers the DLL to go get mail. Write (or process, then write) the mail to a file in /experts/files using the DLL MT4 queries the DLL to discover if there is new mail. If yes, Use MT4 file functions to read the file. |