Desperately need some Win32/C++ help..
I’ve struggled with this for a couple of weeks now, and figured somebody could offer me some assistance.
As a proof of concept, I’m writing a small CLI program that sits idly waiting for COM events from an application. The application throws COM events as dispinterfaces using IDispatch.
Using C# or .NET, subscribing to events is an almost trivial undertaking, but doing this under Win32 and C++ seems ridiculously complicated, and I’m utterly lost as to what to do. I’ve found a plethora of tutorials on the web, but none of them seem to help very much. Perhaps I don’t know what I’m looking for. I’ve searched on things like “connection points”, “IDispatch”, “dispinterfaces”, “COM events”, and a dizzying array of other combinations.
Basically, how can I tell this simple CLI driven application to listen to COM events and run the methods specified by the dispinterface. What I want to do surely doesn’t seem complicated, but with the level of simplicity I’m looking for in this case, it’s leaving me completely lost as far as where to go.
Any help would be much appreciated, as I figure I can’t be the only person in the world who wants to do something like this. >_<

the only thing i know about is to use windows messages
the way it works
your program will go into a loop that will execute
intill the program ends
while (GetMessage(&msg, NULL, 0, 0))
{
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
this receves and sends windows messages
the getmessage function makes windows call
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
which is in your program
and the message is the event
like a button being clicked i think its alot like your com events but i dont know