Delegate Help
-
I've search google exhaustively looking for some help with this and can't seem to find anything that has been productive. I have a Dynamic Link Library written in C++ which makes use of a callback: LRESULT CALLBACK eventListener(HWND hWnd, UINT msg, WPARAM wP, LPARAM lP) { ... } I'm trying to write a C# wrapper for this library and cannot seem to find the correct way to form the delegate to make use of the callback. If anyone could point me in the right direction or knows of an example that might be helpful, it would be very much appreciated.
-
I've search google exhaustively looking for some help with this and can't seem to find anything that has been productive. I have a Dynamic Link Library written in C++ which makes use of a callback: LRESULT CALLBACK eventListener(HWND hWnd, UINT msg, WPARAM wP, LPARAM lP) { ... } I'm trying to write a C# wrapper for this library and cannot seem to find the correct way to form the delegate to make use of the callback. If anyone could point me in the right direction or knows of an example that might be helpful, it would be very much appreciated.
Your function resembled a lot some of the win32 user32.dll Look at www.pinvoke.net to get some ideas based on the functions of windows
-
Your function resembled a lot some of the win32 user32.dll Look at www.pinvoke.net to get some ideas based on the functions of windows
I've looked there, but unfortunately, have only seen the delegate definition without any examples on implementing it. The only reference I've found that comes close is a newsgroup post with someone having the same trouble. Of course, his question went unanswered as well. Luck of the Irish at it's best. lol