Click here to Skip to main content
15,897,273 members
Articles / Desktop Programming / MFC

How can a Hook DLL pass data to the Process sets it .

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
6 Feb 2013CPOL 6.1K  
for example Process A(MFC Process),uses loadlibrary to load a dll and install a global hook(the hook procedure is in the dll).I want this dll to pass any information to the Process A, So I used SendMessage in the hook procedure to send WM_COPYDATA to Process A,but it didnt work.The Process...

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
6 Feb 2013Keanu L
I have maked a mistake. i set the COPYDATASTRUCT wrong value....the cbData in the COPYDATASTRUCT must be set the size of the data the lpData point to.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
China China
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions