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]
On Fri, 30 May 1997, Peter Gerwinski wrote:
According to David Fiddes:
[...]
const SIID_IActiveScriptSiteWindow = '{D10F6761-83E9-11cf-8F20-00805F2CD064}';
[...]
What does the string constant serve for? Any idea how the produced code
Those are registry entries. Delphi compiles this code into an OLE control which is uniquely identified by this ID.
Anyway, all of this is Windoze-only code. Considering the platform-independant spirit of GPC, this is *not* the way to go, IMHO.
JanJaap
--- With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead. -- RFC1925.