Hi all
I'm interfacing with a coupla VB6 Com objects and though I have got it to
work i don't quite know how!
object COMa and COMb, COMb exposes a property a of 'type' COMa
it works if I import the TL and use the CoClass create to explicitly create
an instance of COMa of the type interface that COMb expects
ie
var
COMa: COMaIF; // from TLB IDispatch desc
COMb: COMbIF; // from TLB IDispatch desc
COMa := CoCOMaIF.Create;
COMb := CoCOMbIF.Create;
COMb.a := COMa; // works
but if I 'Late bind' ie let COM work it all out it fails
var
COMa, COMb: variant;
COMa := CreateOLEObkect('COMa.Function');
COMb := CreateOLEObkect('COMb.Function');
COMb.a := COMa; // fails
also when you create an interface in the first method how can you free it.
ie you set a varient to NULL but do you assign an interface nil?
TIA
Regards Neven
N.K. MacEwan B.E. E&E
Ph 649 574 0027
Fax 649 570 2706
"A truth denied the light of action will wither to a promise, propaganda and
then a lie"
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"