ASP (VBScript) vs ActiveX (dll) interfaces 
Author Message
 ASP (VBScript) vs ActiveX (dll) interfaces

I have a problem that I hope somebody else has solved.

I have a three tier application with all of the datalogic held in a dll.

For this examples sake I have three classes IDataObject (an interface),
CSimpleDataObject, CComplexDataobject (concrete implementations of that
interface).

CSimpleDataObject, CComplexDataobject both implement the IDataObject
interface.

My dll contains one additional class CBroker that locates and returns
IDataobjects

Some sample code.

----------------------------------------------------------------------------
---------

Dim obj_One, obj_Two, obj_Broker

set obj_Broker =  server.createobject("mydll.CBroker")

set obj_One =  obj_Broker.Fetch("obj_one_id")
set obj_Two=  obj_Broker.Fetch("obj_two_id")

----------------------------------------------------------------------------
---------

Ok all is fine at this point.  CBroker.Fetch returns an IDataObject. This
either a CSimpleDataObject or CComplexDataobject. I can acess the properties
and methods defined in the IDataObject interface.

One of these properties tells me the concrete type (I know it's bad class
abstraction ... but ... ) so that can call methods from other interfaces the
object supports. Unfortunatly VBScript doesn't see these methods and the
method call fails. I can't type cast and I don't want to have two thousand
different fetch commands.

Does anybody know of another solution?

Kevin



Sat, 10 Feb 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. problem calling ActiveX dll from VBScript in ASP

2. problem calling ActiveX dll from VBScript in ASP

3. ActiveX Document vs DHTML Application vs ASP??

4. ActiveX Document vs DHTML Application vs ASP??

5. ActiveX Document vs DHTML Application vs ASP??

6. ActiveX exe vs ActiveX dll

7. ActiveX dll vs ActiveX control - Whats the difference

8. ActiveX DLL vs ActiveX EXE

9. ActiveX Doc DLL vs ActiveX Doc EXE

10. ActiveX EXE vs ActiveX DLL

11. Dll vs ActiveX dll

12. Crystal Report 7 ActiveX (craxdrt.dll) vs Crystal Report Engine (CPEAUTO.dll)

 

 
Powered by phpBB® Forum Software