ThomasB:
Another option: Let the sending application open a (hidden) window with a text-box that contains the values; then from within the EA you call windows API functions, GetTextA(hwnd) (or something like that), and you have your needed contents.
What about this: the platform (receiving program) opens a hidden window by an imported function. This window will receive the SendMessage with the WM_COPYDATA, and then changes the ints according to the incoming ones (either passing by reference or simply by return), and voila, the platform's messagemap is bypassed. A separate window will do the work and passing the data via imported function.
Another option: Let the sending application open a (hidden) window with a text-box that contains the values; then from within the EA you call windows API functions, GetTextA(hwnd) (or something like that), and you have your needed contents.
WM_COPYDATA a window message need two windows to process it (one send and one receive), but you can not control MT to send or to receive.
So only program a dll, then call functions(send and receive data through parameters ) of dll in MQL programm.
peroid can be control but check time[0] in MQL program.
So only program a dll, then call functions(send and receive data through parameters ) of dll in MQL programm.
peroid can be control but check time[0] in MQL program.
DxdCn:
So only program a dll, then call functions(send and receive data through parameters ) of dll in MQL programm.
Sure I know this. The question was whether a separate function could get control from the platform while checking for WM_COPYDATA message , or not. So only program a dll, then call functions(send and receive data through parameters ) of dll in MQL programm.
All in all the childwindow-idea seems to be working....
childwindow-idea , yes, but for a software you do not have source code, you can not program the child of MT's window.
only maybe arrived so if you are a very excellent programmer like a very excellent hacker.
WM_COPYDATA message is designed for two cooperateing windows, but now you only can control one window! another is MT you can not control(programm).
yes, a separate function could get control from the platform while checking for WM_COPYDATA message ,
it only know the content of WM_COPYDATA in Hex mode, can not process the content.
but not control , only know have message, not know how to process message, since Message transfer is control by system and system supplied API to watch Message pool, and so you only can simulate keydow, mouseclick..... message to MT platform, but not WM_COPYDATA, since MT not processes such messages and MT not supplied such interface.
only maybe arrived so if you are a very excellent programmer like a very excellent hacker.
WM_COPYDATA message is designed for two cooperateing windows, but now you only can control one window! another is MT you can not control(programm).
yes, a separate function could get control from the platform while checking for WM_COPYDATA message ,
it only know the content of WM_COPYDATA in Hex mode, can not process the content.
but not control , only know have message, not know how to process message, since Message transfer is control by system and system supplied API to watch Message pool, and so you only can simulate keydow, mouseclick..... message to MT platform, but not WM_COPYDATA, since MT not processes such messages and MT not supplied such interface.
DxdCn:
childwindow-idea , yes, but for a software you do not have source code, you can not program the child of MT's window.
only maybe arrived so if you are a very excellent programmer like a very excellent hacker.
WM_COPYDATA message is designed for two cooperateing windows, but now you only can control one window! another is MT you can not control(programm).
yes, a separate function could get control from the platform while checking for WM_COPYDATA message ,
it only know the content of WM_COPYDATA in Hex mode, can not process the content.
but not control , only know have message, not know how to process message, since Message transfer is control by system and system supplied API to watch Message pool, and so you only can simulate keydow, mouseclick..... message to MT platform, but not WM_COPYDATA, since MT not processes such messages and MT not supplied such interface.
You can just use the win32 api's to create such a window - you don't have to be
a very excellent hacker...
childwindow-idea , yes, but for a software you do not have source code, you can not program the child of MT's window.
only maybe arrived so if you are a very excellent programmer like a very excellent hacker.
WM_COPYDATA message is designed for two cooperateing windows, but now you only can control one window! another is MT you can not control(programm).
yes, a separate function could get control from the platform while checking for WM_COPYDATA message ,
it only know the content of WM_COPYDATA in Hex mode, can not process the content.
but not control , only know have message, not know how to process message, since Message transfer is control by system and system supplied API to watch Message pool, and so you only can simulate keydow, mouseclick..... message to MT platform, but not WM_COPYDATA, since MT not processes such messages and MT not supplied such interface.
ThomasB you do not know what I said and what this topic's meaning. Zap want send WM_COPYDATA message to MT windows and let MT windows to processes it.
ThomasB you are a programmer, please give your solution to communite with metatrade through
WM_COPYDATA message !! :)
you can create one window to send out WM_COPYDATA message, but you can not create MT Windows to receive and processes WM_COPYDATA message.
you can create one window to send out WM_COPYDATA message, but you can not create MT Windows to receive and processes WM_COPYDATA message.
why you need WM_COPYDATA mode?
if you sure you need, you can write a dll (inside, to creat a window to receive WM_COPYDATA and record the content, and you any other program send WM_COPYDATA to this window). and then inside your MQL indocator or EA, call the function of the dll, to get record.
more quick method is creat a share dll with share memory, your any other program call function of dll to send recoed, your MQL indocator or EA call the function of the dll to get record
DxdCn:
You were right, WM_COPYDATA does not work. The child window can be
created, but behaves strange, so I quit developing in this direction.why you need WM_COPYDATA mode?
I just needed the easiest InterProcessCommunication (as I had no experience in this field, I only learnt C++, but haven't worked with it in Windows), and this seemed to be the easiest compared to eg. shared memory.
I found the golden middle though: creating a NamedPipe, this way the two programs (where the client side can be integrated in a dll for MT4) communicate based on the shared memory concept of pipes, and not two windows by messages.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
-file communication. I don't like this one, it is slow, and sometimes file transfers are even slower on shared servers. (I started with this one, as this is the easiest, but it errs many times, so it is not a solution)
-winapi's WM_COPYDATA through SendMessage(). This seems to be simple, and it is just made for the same thing I would need. Simple interprocess communication. Now, where I am stuck is the receiving side of the terminal. I have no idea how I could integrate the checking for WM_COPYDATA message into an imported dll. (I only know how to integrate such condition into default source messagemap) I don't even know if it is possible at all (I am rather unexperienced in this field), so any help or even ideas would be highly appreciated.
-the last one would be communication via Clipboard: I haven't ever tried clipboard communication, I have no idea about possible interferences that may or may not happen.
If anyone having experience could help me out with this question would be greater than great... :)
As I've searched the forums I saw that it may be of interest from other people as well..
Thanks in advance: Zap