
C++ COM-Object with COM-Object as parameter
Quote:
> IUnknown *pUnk;
> if( objectVar.vt == VT_UNKNOWN )
> pUnk = objectVar.punkVal;
> else if( objectVar.vt == VT_UNKOWN | VT_BYREF )
> pUnk = *objectVar.ppunkVal;
> else
> cerr << "Not an IUnknown Object"
Thanks yery much, i tried it and i works very fine in one way
i made it to instantiate a com-object inside my c++ com-object-server
and return it to VB-Script - Client ... works very well
But i still have a problem:
I have to return the object again to the server:
e.g.
<...>
Set firstObject=CreateObject("Myfirst.first")
Dim secondObject
set secondObject = firstObject.someFunction(...)
' i return the secondObject from my C++ Server
' with variant-type VT_UNKNOWN set
secondObject.testmethod(...) 'works fine
firstObject.someMethod(secondObject)
'my C++ COM-Server gets the Object with VT_IDISPATCH set --> why ???
<...>
Is there a problem if i ignore the VT_IDISPATCH Type and just handle it
as normal VT_IUNKNOWN or do i have to do something like Invoke?
Thanks Markus
Sent via Deja.com
http://www.deja.com/