|
@@ -192,11 +192,14 @@ implementation
|
|
flags:=CLSCTX_LOCAL_SERVER or CLSCTX_REMOTE_SERVER or CLSCTX_INPROC_SERVER;
|
|
flags:=CLSCTX_LOCAL_SERVER or CLSCTX_REMOTE_SERVER or CLSCTX_INPROC_SERVER;
|
|
|
|
|
|
{ actually a remote call? }
|
|
{ actually a remote call? }
|
|
- size:=sizeof(localhost);
|
|
|
|
|
|
+{$ifndef wince}
|
|
|
|
+ //roozbeh although there is a way to retrive computer name...HKLM\Ident\Name..but are they same?
|
|
|
|
+ size:=sizeof(localhost);
|
|
if (MachineName<>'') and
|
|
if (MachineName<>'') and
|
|
(not(GetComputerNameW(localhost,size)) or
|
|
(not(GetComputerNameW(localhost,size)) or
|
|
(WideCompareText(localhost,MachineName)<>0)) then
|
|
(WideCompareText(localhost,MachineName)<>0)) then
|
|
flags:=CLSCTX_REMOTE_SERVER;
|
|
flags:=CLSCTX_REMOTE_SERVER;
|
|
|
|
+{$endif}
|
|
|
|
|
|
OleCheck(CoCreateInstanceEx(ClassID,nil,flags,@server,1,@mqi));
|
|
OleCheck(CoCreateInstanceEx(ClassID,nil,flags,@server,1,@mqi));
|
|
OleCheck(mqi.hr);
|
|
OleCheck(mqi.hr);
|
|
@@ -468,7 +471,13 @@ implementation
|
|
inc(Names,NameLen+1);
|
|
inc(Names,NameLen+1);
|
|
inc(NameCount);
|
|
inc(NameCount);
|
|
end;
|
|
end;
|
|
- res:=DispatchInterface.GetIDsOfNames(GUID_NULL,NamesArray,NameCount,GetThreadLocale,IDs);
|
|
|
|
|
|
+ res:=DispatchInterface.GetIDsOfNames(GUID_NULL,NamesArray,NameCount,
|
|
|
|
+{$ifdef wince}
|
|
|
|
+ LOCALE_SYSTEM_DEFAULT
|
|
|
|
+{$else wince}
|
|
|
|
+ GetThreadLocale
|
|
|
|
+{$endif wince}
|
|
|
|
+ ,IDs);
|
|
{$ifdef DEBUG_COMDISPATCH}
|
|
{$ifdef DEBUG_COMDISPATCH}
|
|
writeln('SearchIDs: GetIDsOfNames result = ',hexstr(res,SizeOf(HRESULT)*2));
|
|
writeln('SearchIDs: GetIDsOfNames result = ',hexstr(res,SizeOf(HRESULT)*2));
|
|
for i:=0 to Count-1 do
|
|
for i:=0 to Count-1 do
|
|
@@ -636,3 +645,4 @@ finalization
|
|
CoUninitialize;
|
|
CoUninitialize;
|
|
end.
|
|
end.
|
|
|
|
|
|
|
|
+
|