Link to home
Start Free TrialLog in
Avatar of astankovic
astankovic

asked on

Sending message to C# application from C++ DLL

I have a C++ Win32 DLL that gets called by Winlogon.exe whenever a user locks and unlocks the PC. So, whenever a user locks the computer Winlogon.exe calls a function in my DLL.
Now, the whole purpose is to have my C# application react on those events.
So how do I send a message to the C# application (which will be running) from the C++ DLL?
This is part 2 of a 3-part question :) For part 1 see:
https://www.experts-exchange.com/questions/20819936/Windows-System-Events.html

Since this is C# section, I’ll also accept comments that answer just C# part, and I’ll post the C++ part in C++ section if needed.

Thanks,
Alex
SOLUTION
Avatar of Agarici
Agarici
Flag of Romania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of astankovic
astankovic

ASKER

Ok, I see what you are saying.
But how do I "listen" for that message in C#? What class would I use?
Could you provide me with a link where I can see some sample code?

Thanks,
Alex
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial