Help for this page

Select Code to Download


  1. or download this
    coclass myCoclass {
            [default] interface ImyCoclass;
            interface ImyWantedinteface;
            [default, source] dispinterface IOtherEvents;
        };
    
  2. or download this
    ConnectToServer(myCo, "FOO.myCoClass")
    Dim myCoInternal As FOO.imyWantedinterface
    Set myCoInternal = myCo
    ' now myCoInternal can access ImyWantedinterface's methods
    myCoInternal.doit ' Works
    
  3. or download this
    use Win32::OLE
    
    my $myCo = Win32::OLE->new('FOO.myCoClass') or die "Cannot create obje
    +ct"; # Works without problems
    ...
     
    # Also given method doit is in the ImyWantedinterface's declaration
    $myCo->doit(); # Fails