OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Nelson, Mark (Mark.NelsonQG.COM)
Date: Wed Oct 03 2001 - 10:22:11 CDT

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

    I have a in-process component that uses MTS and I sometimes get the
    occasional error just like the one described in the original message. I can
    get it on CoCreateInstanceEx. I have recently broke down CoCreateInstanceEx
    to its three calls (CoGetClassObject, CreateInstance, and Release) to see
    which call actually gets the error, and it is CoGetClassObject.

    Would this be a similiar problem? How can it be fixed?

    It might be worth mentioning that the client is an MFC app that I just
    'stuck' the com connection and calls into. Also, I actually connect to two
    components. One on startup that I connect to with smart pointers, then
    disconnect(have no problems with that one). Then as needed, the second
    component is called (usually about 3-5 times per hour). Each call it
    connects using smart pointers also.

    And while i'm on the subject, if the client does get an access error, I've
    been trying to completely wipe out any connection with the component(without
    having to make the user stop and start the application). What happens is
    that on occasion an application will keep getting the access error until the
    user exits and restarts. How can I completely wipe everything clean and get
    a new, good connection?

    -----Original Message-----
    From: Steve Johnson [mailto:sjohnson3TSYSTEMS.COM]
    Sent: Tuesday, October 02, 2001 8:23 PM
    To: DCOMDISCUSS.MICROSOFT.COM
    Subject: Re: Exception in CoCreateInstance

    Ensure that your proxy/stub is in sync with your server dll.

    Steve Johnson
    3t Systems

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

    > I've a component S which is an ATL based out-of-proc server i.e
    > Server.exe.
    >
    > i've a client C living in process Client.exe, which calls a
    > method on object
    > S named pSomeInterfacetoS->GetComponentA(**ppSomeInterfacetoComponentA).
    >
    > The implementation of GetComponentA is shown below
    >
    > CSObj::GetComponentA(**ppSomeInterfaceteComponentA)
    > {
    > // create a loca server version of the object A.
    > :: CoCreateInstance(...,CLSCTX_LOCAL_SERVER, ...);
    > }
    >
    > Compoent A is a ATL based DLL server which is also registered for
    > surrogate
    > based activation (say using OLE View).
    >
    > The problem is the called to cocreateinstance of Component A in a local
    > server throws an exception (accessviolation) sometimes, "ONLY SOMETIMES".
    >
    > Pl note that the exception is thrown only sometimes.
    >
    > i'm running W2000, SP2, VC++ 6.0, SP5, Platform SDK Nov2000.
    >
    > i downloaded the symbol files for W2000 SP2 and managed to get the call
    > stack shown below at the point where the exception occurs.

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

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