|
@@ -186,6 +186,7 @@ unit comobj;
|
|
procedure OleError(Code: HResult);
|
|
procedure OleError(Code: HResult);
|
|
|
|
|
|
function ProgIDToClassID(const id : string) : TGUID;
|
|
function ProgIDToClassID(const id : string) : TGUID;
|
|
|
|
+ function ClassIDToProgID(const classID: TGUID): string;
|
|
|
|
|
|
procedure DispatchInvoke(const Dispatch: IDispatch; CallDesc: PCallDesc;
|
|
procedure DispatchInvoke(const Dispatch: IDispatch; CallDesc: PCallDesc;
|
|
DispIDs: PDispIDList; Params: Pointer; Result: PVariant);
|
|
DispIDs: PDispIDList; Params: Pointer; Result: PVariant);
|
|
@@ -196,6 +197,7 @@ unit comobj;
|
|
|
|
|
|
function ComClassManager : TComClassManager;
|
|
function ComClassManager : TComClassManager;
|
|
|
|
|
|
|
|
+
|
|
type
|
|
type
|
|
TCoCreateInstanceExProc = function(const clsid: TCLSID; unkOuter: IUnknown; dwClsCtx: DWORD; ServerInfo: PCoServerInfo;
|
|
TCoCreateInstanceExProc = function(const clsid: TCLSID; unkOuter: IUnknown; dwClsCtx: DWORD; ServerInfo: PCoServerInfo;
|
|
dwCount: ULONG; rgmqResults: PMultiQIArray): HResult stdcall;
|
|
dwCount: ULONG; rgmqResults: PMultiQIArray): HResult stdcall;
|
|
@@ -363,6 +365,16 @@ implementation
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
+ function ClassIDToProgID(const classID: TGUID): string;
|
|
|
|
+ var
|
|
|
|
+ progid : LPOLESTR;
|
|
|
|
+ begin
|
|
|
|
+ OleCheck(ProgIDFromCLSID(@classID,progid));
|
|
|
|
+ result:=progid;
|
|
|
|
+ CoTaskMemFree(progid);
|
|
|
|
+ end;
|
|
|
|
+
|
|
|
|
+
|
|
procedure SafeCallErrorHandler(err : HResult;addr : pointer);
|
|
procedure SafeCallErrorHandler(err : HResult;addr : pointer);
|
|
var
|
|
var
|
|
info : IErrorInfo;
|
|
info : IErrorInfo;
|