Using Interfaces in an VB 6 DLL in VBScript 
Author Message
 Using Interfaces in an VB 6 DLL in VBScript

I am using ASP and VBScript to talk to a VB 6 ActiveX DLL and simply cannot
get VBScript to work with any of the implemented interfaces in my DLL.

In my case, I have an interface called IFolder and one of the
implementations of this is MessageFolder.  IFolder has properties like Name,
FolderType, Items and MessageFolder simply implements all of these.

I have a function in the DLL called GetCurrentFolder that returns one of the
implementations as IFolder - something like:

Public Function GetFolder() as IFolder
    Set GetFolder = mCurrentFolder
End Function

VBScript does not find any of the properties for this object because it is
looking at the base object (MessageFolder) which has no properties.  This
really does not make any sense because I passed it the IFolder interface
pointer!  If I add a function to MessageFolder itself called Name that
simply calls the interface it works fine, but I don't really want to do
this.

The only help I found on this was the knowledge base article Q188716
( http://www.*-*-*.com/ ) which
pretty much recommended what I was already doing (return something typed as
the proper interface) which does NOT work.  I even followed the steps in the
article that demonstrated the fix and that did not work either.

So does anyone know how to make this work without having to write stub
properties in MessageFolder that calls the IFolder interface?  It seems like
a real pain to have to maintain the useless properties.

Thanks!

Chris Kaczor



Tue, 10 Jul 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Using Interfaces in an VB 6 DLL in VBScript

2. Passing Arrays to a VB 5.0 SP3 DLL using VBScript control

3. Interfacing VBScript with a DLL - how?

4. ASP (VBScript) vs ActiveX (dll) interfaces

5. VB Implementing Multiple Interfaces and VBScript - Any Suggestions?

6. VB/VBScript interfacing with external API ?

7. Using complex data types from VB ActiveX dlls with server-side scripting

8. Using complex data types from VB ActiveX dlls with server-side scripting

9. Installing/Using a server-side VB ActiveX DLL

10. Using complex data types from VB ActiveX dlls with server-side scripting

11. Using ASP with VB DLL

12. Using WSH to Compile a VB ActiveX dll

 

 
Powered by phpBB® Forum Software