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: Mon Oct 08 2001 - 14:45:39 CDT

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

    Assuming you had a COCLASS named MyObjectName which implements a default
    interface and another interface called MyOtherInterface, you would do like
    So:

    '/////////////////////////////////////////
    Dim Obj As MyClassName
    Dim Itf2 As MyOtherInterface

    Set Obj = New MyObjectName (This gets the default interface)

    Set Itf2 = Obj (This does a QI behind the scenes)
    '/////////////////////////////////////////

    Steve Johnson
    3t Systems

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

    > I have an ATL server object which exposes 2 interfaces. In Visual
    > c++ I will
    > get a pointer to the first interface using CoCreateInstance, and using
    > QueryInterface of first interface I can easily get the pointer to second
    > interface. Is there a way to to do this in VBA.

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