Using CPP dll from C# (Catch PostMessage)

hi,

i had used cpp dll that use the function PostMessage in order to signal the wrapper cpp aplication (window app) that something happened (when the dll recieved new file).

now i need to use the same dll but with wrapper application that need to be written in C#, but my problem is to catch the PostMessage that been sent from the cpp dll file in the C# app because i dont know how can i get the handle to my C# window and i dont know if i can produce marshling prototype for the GetMessage function.


is it possible to catch PostMessage
if not is it much better to use Delegates and how do i do so.


Thanks a lot 
Ronan



Answer this question

Using CPP dll from C# (Catch PostMessage)

  • Jay McCleery

    Forms and Controls have a WndProc method that you can override to perform custom message processing.



  • Using CPP dll from C# (Catch PostMessage)