|
@@ -288,6 +288,8 @@ unit comobj;
|
|
|
function ProgIDToClassID(const id : string) : TGUID;
|
|
|
function ClassIDToProgID(const classID: TGUID): string;
|
|
|
|
|
|
+ function StringToLPOLESTR(const Source: string): POLEStr;
|
|
|
+
|
|
|
procedure DispatchInvoke(const Dispatch: IDispatch; CallDesc: PCallDesc;
|
|
|
DispIDs: PDispIDList; Params: Pointer; Result: PVariant);
|
|
|
procedure DispatchInvokeError(Status: HRESULT; const ExceptInfo: TExcepInfo);
|
|
@@ -573,6 +575,17 @@ implementation
|
|
|
end;
|
|
|
|
|
|
|
|
|
+ function StringToLPOLESTR(const Source: string): POLEStr;
|
|
|
+ var
|
|
|
+ Src: WideString;
|
|
|
+ begin
|
|
|
+ Src := WideString(Source);
|
|
|
+ Result := CoTaskMemAlloc((Length(Src)+1) * SizeOf(WideChar));
|
|
|
+ if Result <> nil then
|
|
|
+ Move(PWideChar(Src)^, Result^, (Length(Src)+1) * SizeOf(WideChar));
|
|
|
+ end;
|
|
|
+
|
|
|
+
|
|
|
procedure SafeCallErrorHandler(err : HResult;addr : pointer);
|
|
|
{$ifndef wince}
|
|
|
var
|