I have used the comWrapper tool to create class and interfaces for an comDispInterface (automation) server.
The wrapped classes have zero arity constructors.
One of the classes returns an iDispatch object of the second class type. How do I create the class object from the iDispatch object?
class DVDoc
class app:getDVDoc : (integer NIndex) -> iDispatch Value.
I want to create the DVDoc object from the iDispatch returned.
Thanks,
Stephen
-
- VIP Member
- Posts: 1466
- Joined: 28 Feb 2000 0:01
Re: Com Creation
Given that the object you "really" want is an iDVDoc object this is the safest code for your task:
Code: Select all
IDisp = App:getDVDoc(Idx),
IDVDoc = comInterface::getFromUnknown(iDVDoc::iid, IDisp),
IDisp:release(),
Regards Thomas Linder Puls
PDC
PDC