OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Fareeduddin A. Mohammed (fareedSIGMATEL.COM)
Date: Tue Oct 09 2001 - 08:56:42 CDT

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

    Thanks Steve, your idea worked for me.

    Regards
    -Fareed

    -----Original Message-----
    From: Distributed COM-Based Code [mailto:DCOMDISCUSS.MICROSOFT.COM]On
    Behalf Of Steve Johnson
    Sent: Monday, October 08, 2001 2:46 PM
    To: DCOMDISCUSS.MICROSOFT.COM
    Subject: Re: two interface in a single server object . visual basic.

    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

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