Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   message pump code for COM STA (http://www.velocityreviews.com/forums/t604964-message-pump-code-for-com-sta.html)

George2 04-11-2008 02:23 AM

message pump code for COM STA
 
Hello everyone,


1.

For message pump code for COM STA, my question is, we just need to copy and past the following code to STA owner thread, no need to implement any functions to handle msg (e.g. hidden window message handler)?

(I think no need and I think COM Runtime will plug-in a message handler for the hidden window, to process the msg and call related function automatically?)

Code:

MSG msg;
while (GetMessage (&msg, 0, 0, 0))
 DispatchMessage (&msg);

2.

If all the message pump code are common, why not COM automatically generates the code for all STA? Because some STA has the requirement of not handling in-coming calls from other apartment?


thanks in advance,
George


All times are GMT. The time now is 07:08 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.