According to David Fiddes:
Here's a simple example of how Delphi 3.0 implements interfaces. The main difference between this and what Frank was suggesting is that Delphi 3.0 doesn't allow and fields in an interface. This is because COM is designed
"and fields"? (Is the "and" superfluous?) What's "COM"? Sorry, but I don't understand.
to work across process and machine boundaries using remote procedure calls(RPC) but does have support for remote variable calls(if there is such a thing!) and this is the main reason for using interfaces...
You mean: "does *not* have support ..."?
const SIID_IActiveScriptSiteWindow = '{D10F6761-83E9-11cf-8F20-00805F2CD064}';
type
IActiveScriptSiteWindow = interface(IUnknown) [SIID_IActiveScriptSiteWindow]
function GetWindow( out phwnd : HWND ):HResult; stdcall; function EnableModeless( fEnable : boolean ):HResult; stdcall;
end;
If I understand this right, the syntax is
Type <name> = interface ( <parent interfaces> ) [ <string constant> ]
<method declarations>
end;
What does the string constant serve for? Any idea how the produced code looks like? (It's trivial to make GPC to accept the above source, but probably nontrivial to make it output something reasonable.;-)
Greetings,
Peter
Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer peter.gerwinski@uni-essen.de - http://home.pages.de/~peter.gerwinski/ [970201] maintainer GNU Pascal [970510] - http://home.pages.de/~gnu-pascal/ [970125]