枝
枝上柳绵
Unregistered / Unconfirmed
GUEST, unregistred user!
最主要是我不太了解COM实现过程,所以不知道应当怎样修改,有没有大大,有现成的代码之类的,修改一二,谢谢const ole32 = 'ole32.dll'; CLSCTX_INPROC_SERVER = 1; CLSCTX_LOCAL_SERVER = 4; IID_IE: TGUID ='{0002DF01-0000-0000-C000-000000000046}';type PCLSID = PGUID; TCLSID = TGUID;type TCoCreateInstance= function (ClassID:TCLSID;pointer;dwClsContextWORD;riid:TGUID;ppv:IDispatch) :HResult ; var CoCreateInstance:tCoCreateInstance;function CreateIEOleObject(): IDispatch;var ClassID: TCLSID;begin ClassID := IID_IE;//ie.application的GUID CoCreateInstance(ClassID, nil, CLSCTX_INPROC_SERVER or CLSCTX_LOCAL_SERVER, IDispatch, Result);//在这一步出错end;var IE: Variant; begin IE := CreateOleObject();end;end.