message pump code for COM STA

Discussion in 'C Programming' started by George2, Apr 11, 2008.

  1. George2

    George2

    Joined:
    Feb 12, 2008
    Messages:
    108
    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
    George2, Apr 11, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. pfurb

    Microsoft Help: IEExe.exe and STA

    pfurb, Jan 19, 2004, in forum: ASP .Net
    Replies:
    7
    Views:
    571
    Jeff B.
    Jan 20, 2004
  2. pfurb
    Replies:
    0
    Views:
    523
    pfurb
    Jan 21, 2004
  3. Crimson_M

    Design Flow: STA to Synthesis

    Crimson_M, Sep 8, 2003, in forum: VHDL
    Replies:
    1
    Views:
    796
    Brian Drummond
    Sep 9, 2003
  4. Cantankerous Old Git

    Windows message pump problems

    Cantankerous Old Git, Aug 16, 2005, in forum: Python
    Replies:
    2
    Views:
    519
    Cantankerous Old Git
    Aug 18, 2005
  5. George2

    COM message pump

    George2, Mar 27, 2008, in forum: C Programming
    Replies:
    0
    Views:
    364
    George2
    Mar 27, 2008
Loading...

Share This Page