
VB Com Object Using Implements Fails In VBScript
VBScript knows only the default interface of your coclass
since VB _always_ generates a default interface for each coclass itself :-(
VBS has no chance to see a second or third interface in your coclass
you can do serveral things to manage the problem
1) build a script compatible wrapper class to thecoclass with more than one
interface
2) cast your coclass to your wanted interface with the help of a C++-Dll
which calls QueryInterface explicitly
Quote:
> Hi,
> In VB 6.0 on a Win2000 machine, I have written a COM dll to be used within
> Activer Server Script and it is failing on WinNT, IIS 4.0 but ok on
Win2000
> IIS 5.0. It is failing on the Server.CreateObject() method, and message I
am
> getting is:
it works on IIS5?? i cannot beleave it! are u using ASP+?
Quote:
> "Class Does not Support Automation or does not support expected interface"
> The problem only happens with COM objects that use the Implement Interface
> strategy. I first wrote a dll with a base interface with stub but no
code,
> I call this interface IBaseInterface, for example. I then build a
component
> with an interface named IDerived interface.
> At the top of the IDerived interface class I simply write :
> Implement IBaseInterface
why IDerived???
it is a class - why prefix it with I ?
or do u want to derive one custom interface from another?
this is impossible with VB, u can only derive from IUnknown or IDispatch