我正在尝试使用以下代码(Delphi)获取全局接口表:
uses Comobj, ActiveX;
var
cGIT : IGlobalInterfaceTable = NIL;
const
CLSID_StdGlobalInterfaceTable: TGUID = '{00000146-0000-0000-C000-000000000046}';
function GIT : IGlobalInterfaceTable;
begin
if (cGIT = NIL) then
OleCheck (CoCreateInstance (CLSID_StdGlobalInterfaceTable, NIL,
CLSCTX_ALL, IGlobalInterfaceTable, cGIT ));
Result := cGIT;
end;
然而,CoCreateInstance 抛出了一个“类未注册”的异常。实际上,在 HKCR/CLSID 中没有 {00000146- etc. } 的条目。
应该注册哪个 dll 或 ocx,才能在注册表中获得这个定义呢?或者我完全做错了什么?