you would still have to create the object that implements that interface using a the corresponding coClass in the type library. Otherwise it is no different to a pointer (well, it is a pointer really) in that it points to nil until you assign it something. The underlying object, once instantiated, is freed automatically since it is reference counted (see TInterfacedObject).

Cheers,
Phil.

Paul A Norman wrote:
Hi to all,
 
There is something about tyoelibraries and interfaces that I have never quite grapsed.
 
When you declare a 'variable' say for accessing an IxxxSomething as fo example in MSHTML_TLB
 
 var
  myImage : IhtmlImgElement;
 
You do not have to create or dispose of it.
Is that because it is only some kind of pointer to something that already latently exists in the Interfac(ed) document?
 
Paul

_______________________________________________ Delphi mailing list [email protected] http://ns3.123.co.nz/mailman/listinfo/delphi


begin:vcard
fn:Phil Middlemiss
n:Middlemiss;Phil
org:Vision Software, MTS Ltd
email;internet:[EMAIL PROTECTED]
title:Project Leader
tel;work:+64 7 3480001
tel;cell:+64 27 4592648
x-mozilla-html:TRUE
url:http://www.tumonz.co.nz
version:2.1
end:vcard

_______________________________________________
Delphi mailing list
[email protected]
http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to