Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I handle an external event in C#?

Status
Not open for further replies.

pmccombs

Programmer
May 29, 2003
7
0
0
US
Hi,

I have written an unmanaged Win32 DLL that generates events. The event it generates is a registered event of my choosing, which I have declared (via Win32 APIs, in C) in the following manner:

const UINT wmMessage = RegisterWindowMessage("B8AB0DA6-D2C5-446b-AEB6-0894D7C8992E");

Now, when this message gets posted to one of my C# windows, I need to handle it. I suppose I ought to write a sort of delegate for it, and somehow subscribe to this message.

I am rather a beginner at events in C#, and don't know what to do next. Any ideas?

-Peter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top