home *** CD-ROM | disk | FTP | other *** search
- unit GITIntf;
-
- interface
-
- uses
- ActiveX, Windows;
-
- const
- CLSID_StdGlobalInterfaceTable : TGUID =
- '{00000323-0000-0000-C000-000000000046}';
-
- type
- IGlobalInterfaceTable = interface(IUnknown)
- ['{00000146-0000-0000-C000-000000000046}']
- function RegisterInterfaceInGlobal(pUnk: IUnknown;
- const riid: TIID; out dwCookie: DWord): HResult; stdcall;
- procedure RevokeInterfaceFromGlobal(
- dwCookie: DWord); safecall;
- function GetInterfaceFromGlobal(dwCookie: DWord;
- const riid: TIID; out ppv): HResult; stdcall;
- end;
-
- function GIT: IGlobalInterfaceTable;
-
- implementation
-
- uses
- ComObj;
-
- function GIT: IGlobalInterfaceTable;
- const
- GITIntf: IGlobalInterfaceTable = nil;
- begin
- if not Assigned(GITIntf) then
- GITIntf := CreateComObject(CLSID_StdGlobalInterfaceTable) as IGlobalInterfaceTable;
- Result := GITIntf
- end;
-
- end.
-