|
@@ -192,14 +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? }
|
|
-{$ifndef wince}
|
|
|
|
|
|
+{$ifndef wince}
|
|
//roozbeh although there is a way to retrive computer name...HKLM\Ident\Name..but are they same?
|
|
//roozbeh although there is a way to retrive computer name...HKLM\Ident\Name..but are they same?
|
|
size:=sizeof(localhost);
|
|
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}
|
|
|
|
|
|
+{$endif}
|
|
|
|
|
|
OleCheck(CoCreateInstanceEx(ClassID,nil,flags,@server,1,@mqi));
|
|
OleCheck(CoCreateInstanceEx(ClassID,nil,flags,@server,1,@mqi));
|
|
OleCheck(mqi.hr);
|
|
OleCheck(mqi.hr);
|
|
@@ -324,9 +324,22 @@ implementation
|
|
inc(PPointer(Params));
|
|
inc(PPointer(Params));
|
|
end;
|
|
end;
|
|
varVariant:
|
|
varVariant:
|
|
|
|
+ begin
|
|
|
|
+{$ifdef DEBUG_COMDISPATCH}
|
|
|
|
+ writeln('Got ref. variant containing type: ',PVarData(PPointer(Params)^)^.VType);
|
|
|
|
+{$endif DEBUG_COMDISPATCH}
|
|
|
|
+ if PVarData(PPointer(Params)^)^.VType=varString then
|
|
|
|
+ begin
|
|
{$ifdef DEBUG_COMDISPATCH}
|
|
{$ifdef DEBUG_COMDISPATCH}
|
|
- writeln('Unimplemented ref variant dispatch');
|
|
|
|
|
|
+ writeln(' Casting nested varString: ',Ansistring(PVarData(Params^)^.vString));
|
|
{$endif DEBUG_COMDISPATCH}
|
|
{$endif DEBUG_COMDISPATCH}
|
|
|
|
+ VarCast(PVariant(Params^)^,PVariant(Params^)^,varOleStr);
|
|
|
|
+ end;
|
|
|
|
+
|
|
|
|
+ Arguments[i].VType:=varVariant or varByRef;
|
|
|
|
+ Arguments[i].VPointer:=PPointer(Params)^;
|
|
|
|
+ inc(PPointer(Params));
|
|
|
|
+ end
|
|
else
|
|
else
|
|
begin
|
|
begin
|
|
{$ifdef DEBUG_COMDISPATCH}
|
|
{$ifdef DEBUG_COMDISPATCH}
|