You can still use Handles (Windows Forms equivalent of an Hwnd) and message
posting calls to send data back and forth. If you really want to do it the
..NET way then delegates will work. You simply have the *dll* accept a
delegate as a parameter, and have the caller pass in a handler that matches
the delegate. Then you can simply call that method inside of your dll and
the caller will get the information. It isn't nearly the same as the
Windows Message Pump, but all of that still exists if you are familiar with
it and still want to use it.
--
Justin Rogers
DigiTec Web Consultants, LLC.
"Ken Williams" <g3***@gb7abc.n et> wrote in message
news:bi******** **@newsg4.svr.p ol.co.uk...
Hi I have a DLL written in C/C++ that is passed Hwnd when it is called.
When the DLL has data for the calling program it uses Hwnd to post a
windows message back to the calling program saying it wants attention.
I have looked at Delegates and events, but it's not obvious how I can
replicate this feature in C#.
Anyone got a sample of code that does something similar in C# ?
Thanks Ken