OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Brian Muth (bmuthSWI.COM)
Date: Mon Jan 07 2002 - 12:04:37 CST

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    Jorge, I don't know anything about Delphi, but I suspect your timer
    component is based on the SetTimer() Win32 API. When you look at this
    function, you will see that the first parameter is a handle to a window.

    This is required because the timer is triggered through a windows
    message. This means that your program must have a message pump.

    The way I see it, you have the following choices....

    1. Leave your server as STA.
    2. Re-write your server in regular ATL. Spawn a thread that simply
    sleeps for a period of time and sets your internal variable to false.
    3. dig down into the implementation of the Delphi timer to see what that
    window handle is. You will have to figure out where this window is
    created (if at all), and then spawn a thread that pumps the message
    queue. If this sounds like a lot of work, it probably is.

    Can you explain what you are trying to achieve here. Obviously, you are
    trying to detect if the server is alive. However, if the server is dead,
    your method call is going to fail anyway, so I fail to see what you are
    trying gain with this implementation in the first place.

    ----------------------------------------------------------------
    Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
    contains important info. Save time, search the archives at
    http://discuss.microsoft.com/archives/index.html .
    To unsubscribe, mailto:DCOM-signoff-requestDISCUSS.MICROSOFT.COM