OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Steve Johnson (sjohnson3TSYSTEMS.COM)
Date: Fri Aug 17 2001 - 14:24:54 CDT

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

    Yikes! Does not play well with others. :)

    Steve Johnson
    3t Systems

    mailto://sjohnson3tsystems.com
    (303) 858-8800 x265

    > I once wrote an app that used Simple MAPI. MAPILogon calls
    > MapiInitialize(0) internally. MapiInitialize in turn calls
    > CoInitialize(0).
    >
    > Then I tried to call some perfmon API's, and the fun began.
    >
    > PdhAddCounter calls CoInitializeEx(0, COINIT_MULTITHREADED).
    > If it gets back an RPC_E_CHANGED_MODE error, it calls
    > CoUnitialize! It then calls
    > CoInitializeEx(0, COINIT_MULTITHREADED) a second time.
    > If this second call fails it calls CoUninitialize a second
    > time and gives up. I discovered this behavior with SoftICE
    > and was quite surprised by it. Here's a short demonstration
    > program:
    > http://216.87.176.39/pdhcom/pdhcom.cpp.txt

    ----------------------------------------------------------------
    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