Hello. I can not understand, Google does not respond: can children windows ( WS_CHILD ) receive WM_COPYDATA messages?

In parallel, if you are not bothered, explain in CreateRemoteThread , more precisely, for the 4th and 5th arguments. Need to create such a function, the name should be exactly that?

 DWORD WINAPI ThreadProc( LPVOID lpParameter); 

After that, transfer (in principle through the same WM_COPYDATA ) to the process, from where I will run, and throw it as an argument to CreateRemoteThread ? I looked at the definition of the type of the 4th argument, everything seems to converge

 typedef DWORD (WINAPI *PTHREAD_START_ROUTINE)(LPVOID lpThreadParameter); 

Thank you in advance

  • Нужно создавать такую функцию, имя должно быть именно такое? The signature should be like this. A name can be what you like (and the compiler does not mind). Moreover, even the names of the arguments may be different. The main thing is that the number of arguments and their type, as well as the type of the returned value match (in fact, the types must coincide in binary). - KoVadim 7:09 pm
  • @KoVadim, yeah, with the signature clear, thanks. I also thought: if I pass the reference to a function to another process, there will be confusion, because the other address space is all business. Tried, nothing happens, GetLastError returns 6 - the wrong handle. But here we are probably talking about the process descriptor (1 argument), although it seems to have gotten fine. Tell me what could be the matter? - Arthur Klochko
  • "I can not understand ... can child windows (WS_CHILD) receive WM_COPYDATA messages?" - read the comments , especially regarding ChangeWindowMessageFilter / Ex, perhaps this is the cause of your question. - mega
  • @mega, did not help - Arthur Klochko
  • Divide the task, the easiest way is to look for errors. - mega

0