I have created a service with ATL Wizard. In the
"void CServiceModule::Run()" function I found the code
while (GetMessage(&msg, 0, 0, 0))
DispatchMessage(&msg);
My question is: where are messages from "DispatchMessage(&msg)" processed?
Thanx a lot!
Printable View
I have created a service with ATL Wizard. In the
"void CServiceModule::Run()" function I found the code
while (GetMessage(&msg, 0, 0, 0))
DispatchMessage(&msg);
My question is: where are messages from "DispatchMessage(&msg)" processed?
Thanx a lot!
If your object is running in a STA then all calls to its methods will go through the Message loop. Read up on STA Stuff.
Hi,
When you call CoInitialize or CoInitailizeEx with apartment model threading the COM Subsystem will
create an Invisible Window with class name "OleMainThreadWndClass". it will use this window to
recieve client requests. this is the simplest expaination, if you need more details refer to any book
which explains COM threading models and proxy implementation
Regards,
Anil