Ask a questionAsk a question
 

Answerwm_copydata with postmessage

  • Tuesday, November 03, 2009 7:27 PMDalai Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    on vista, sending wm_copydata message from dll to exe c++ mfc projects.

    don't need a return value but sendmessage works and postmessage doesn't

    using ChangeWindowMessageFilter(WM_COPYDATA,MSGFLT_ADD) in both apps.

    anyone any ideas?

Answers

  • Tuesday, November 03, 2009 7:32 PMjinzai Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    ...its supposed to return an lResult (32 bit value) that says whether it honored the request, (!0) or not (0). PostMessage should never work for that, however. The buffer is temporary...PostMessage would not be able to gurarantee the content of the buffer had not changed. Its all spelled out here...
    http://msdn.microsoft.com/en-us/library/ms649011(VS.85).aspx
    • Marked As Answer byDalai Wednesday, November 04, 2009 9:49 AM
    •  

All Replies

  • Tuesday, November 03, 2009 7:32 PMjinzai Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    ...its supposed to return an lResult (32 bit value) that says whether it honored the request, (!0) or not (0). PostMessage should never work for that, however. The buffer is temporary...PostMessage would not be able to gurarantee the content of the buffer had not changed. Its all spelled out here...
    http://msdn.microsoft.com/en-us/library/ms649011(VS.85).aspx
    • Marked As Answer byDalai Wednesday, November 04, 2009 9:49 AM
    •