OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Stephen Sauls (SSAULS_at_OPTO22.COM)
Date: Fri Aug 30 2002 - 10:11:28 CDT

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

    VC++ 6.0
    ATL
    PII 300
    W2K

    I created an Inproc ATL COM server, which contains only one very simple
    method. The idl file is copied below. In my test client (a simple dialog
    application) I perform the following:

            for (i = 0; i < 100000; i++){
                    m_pIScnr->Read(&Value);
            }

    using GetTickCount() I determined that this loop takes 12500ms.

    I also created a standard DLL, which exported one method with the exact same
    signature and implementation. I tested it using a similar loop and
    determined that the loop took 30ms.

    In the settings for the idl file I have "Stubless Proxies" unchecked.

    Can someone please explain why the inproc server call takes so long.

    Thank you for your time.

    import "oaidl.idl";
    import "ocidl.idl";

            [
                    object,
                    uuid(073DA079-0B5B-4C5A-9A84-005DB23EDB04),

                    helpstring("IScnr_ComCallTest Interface"),
                    pointer_default(unique)
            ]
            interface IScnr_ComCallTest : IUnknown
            {
                    [helpstring("method Read")] HRESULT Read([out] DWORD*
    pValue);
            };

    [
            uuid(CD7FE741-EA6F-401E-8E5E-1A7FE722EF8B),
            version(1.0),
            helpstring("ComCallTest 1.0 Type Library")
    ]
    library COMCALLTESTLib
    {
            importlib("stdole32.tlb");
            importlib("stdole2.tlb");

            [
                    uuid(F05F5C15-850E-4BB8-909D-CA39E65C3FB3),
                    helpstring("Scnr_ComCallTest Class")
            ]
            coclass Scnr_ComCallTest
            {
                    [default] interface IScnr_ComCallTest;
            };
    };

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