Accessing non-default interfaces 
Author Message
 Accessing non-default interfaces

Hello.
My COM class CClass implements default dispinterface IDefault and several
other dispinterfaces I1, I2, ...
When I create new object of class CClass I get access to IDefault interface
and can call its methods and properties.
How can I access I1, I2 ... interfaces? Is it possible in script languages?
Pavel


Sat, 04 May 2002 03:00:00 GMT  
 Accessing non-default interfaces

Script clients can only access an object's default interface...

--
Michael Harris

  Hello.
  My COM class CClass implements default dispinterface IDefault and several
  other dispinterfaces I1, I2, ...
  When I create new object of class CClass I get access to IDefault interface
  and can call its methods and properties.
  How can I access I1, I2 ... interfaces? Is it possible in script languages?
  Pavel



Sat, 04 May 2002 03:00:00 GMT  
 Accessing non-default interfaces


Quote:
> Michael-
>   I'm facing this same problem. Can you direct me to where this limitation
> is documented?

No idea as to where it's documented, however there are a number of ActiveX
wrappers which provide access to them, Peter Torr has one I know, and I
believe Clarence Washington has a couple on his site
http://cwashington.netreach.net

Jim.



Tue, 07 May 2002 03:00:00 GMT  
 Accessing non-default interfaces
Michael-
  I'm facing this same problem. Can you direct me to where this limitation
is documented?

Thanks,
 Bill


Script clients can only access an object's default interface...

--
Michael Harris

Hello.
My COM class CClass implements default dispinterface IDefault and several
other dispinterfaces I1, I2, ...
When I create new object of class CClass I get access to IDefault interface
and can call its methods and properties.
How can I access I1, I2 ... interfaces? Is it possible in script languages?
Pavel



Tue, 07 May 2002 03:00:00 GMT  
 Accessing non-default interfaces

I would assume that this simply a consequence of the fact that script clients support only Variants.

In VB, for example, you can

Dim oMyObj As ISomeNonDefaultInterface

and assign any object that supports ISomeNonDefaultInterface to oMyObj.

In VBScript you can only Dim oMyObj implicitly as a Variant.  There's just no script language support to let the engine know when "Dim" a variable or you "Set" an object reference what interface you want to access other that the default interface.

--
Michael Harris

  Michael-
    I'm facing this same problem. Can you direct me to where this limitation
  is documented?

  Thanks,
   Bill



  Script clients can only access an object's default interface...

  --
  Michael Harris


  Hello.
  My COM class CClass implements default dispinterface IDefault and several
  other dispinterfaces I1, I2, ...
  When I create new object of class CClass I get access to IDefault interface
  and can call its methods and properties.
  How can I access I1, I2 ... interfaces? Is it possible in script languages?
  Pavel



Tue, 07 May 2002 03:00:00 GMT  
 Accessing non-default interfaces

Michael-
  Well in our case we're (obviously) not using Dim to specify the alternate interface. Our DLL supports a method which returns the desired interface; e.g.,

public function Ifoo() as foo
    set Ifoo = me
end function

The above is a method of the bar class (that also implements foo). My conclusion is that the problem is deeper than the "typeless" nature of scripts.

Thanks for the response,
 Bill

  I would assume that this simply a consequence of the fact that script clients support only Variants.

  In VB, for example, you can

  Dim oMyObj As ISomeNonDefaultInterface

  and assign any object that supports ISomeNonDefaultInterface to oMyObj.

  In VBScript you can only Dim oMyObj implicitly as a Variant.  There's just no script language support to let the engine know when "Dim" a variable or you "Set" an object reference what interface you want to access other that the default interface.

  --
  Michael Harris



Thu, 09 May 2002 03:00:00 GMT  
 Accessing non-default interfaces
Jim-
  Thanks for the pointers. Torr's wrapper appears only to work with Windows
Shell Script, not with JScript and ASP.  I don't find anything like this at
Washington's site -- though there is some interesting stuff there! Let me
know if you know of any other options.

Thanks,
Bill


Quote:



> > Michael-
> >   I'm facing this same problem. Can you direct me to where this
limitation
> > is documented?

> No idea as to where it's documented, however there are a number of ActiveX
> wrappers which provide access to them, Peter Torr has one I know, and I
> believe Clarence Washington has a couple on his site
> http://cwashington.netreach.net

> Jim.



Thu, 09 May 2002 03:00:00 GMT  
 Accessing non-default interfaces


Quote:
> Jim-
>   Thanks for the pointers. Torr's wrapper appears only to work with Windows
> Shell Script, not with JScript and ASP.

No I believe Torr's wrapper falls down in ASP alone, it would work inside the
browser - I hadn't realised it was an ASP solution you were looking for.

Quote:
>  I don't find anything like this at
> Washington's site -- though there is some interesting stuff there! Let me
> know if you know of any other options.

I was thinking of Dynarap.dll at:

http://cwashington.netreach.net/project_bench/default.asp?topic=code

Jim.



Fri, 10 May 2002 03:00:00 GMT  
 Accessing non-default interfaces
Jim-
  Thanks for the additional info.  Not being a C++ person I didn't even
recognize this dll as a candidate for solving the interface reference
problem. I'll take a look at it.  Hopefully I can use it to reference
interfaces without having to become a C++ expert!

Regards,
 Bill


Quote:



> > Jim-
> >   Thanks for the pointers. Torr's wrapper appears only to work with
Windows
> > Shell Script, not with JScript and ASP.

> No I believe Torr's wrapper falls down in ASP alone, it would work inside
the
> browser - I hadn't realised it was an ASP solution you were looking for.

> >  I don't find anything like this at
> > Washington's site -- though there is some interesting stuff there! Let
me
> > know if you know of any other options.

> I was thinking of Dynarap.dll at:

> http://cwashington.netreach.net/project_bench/default.asp?topic=code

> Jim.



Fri, 10 May 2002 03:00:00 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. Accessing non-default interfaces

2. ActiveX: Accessing events on non default interfaces

3. accessing the non default interface of a COM object from VB

4. Component to retrieve non-default interfaces

5. Component to retrieve non-default interfaces

6. Component to retrieve non-default interfaces

7. How to use non-default interface, late-bound?

8. Access to non default nterfaces

9. Sending e-mail using non-default-account from Access 97

10. printer default to non-default printer

11. Non-default parameter not allowed after default parameter

12. Non-default parameter not allowed after default parameter

 

 
Powered by phpBB® Forum Software