In my search of the error of the return of S_OK and not S_FALSE (see my previous message), I have made a very small sever with only one method wich send S_FALSE (HResult type), unfortunatly I have an error with the small client program: The project TestTest.exe has send the exception class EOleSysError with the message 'variable type invalid' (it's the instruction Return:=coll.Method
which raise the error).
Any idea?
The .ridl
the server code:
function TTest1.Method: HResult;
begin
Result:=S_FALSE;
end;
and the client code:
procedure TForm1.Button1Click(Sender: TObject);
var
coll:variant;
Return:HResult;
begin
coll:= CreateOLEObject('Project.Test1');
Return:=coll.Method;
if Return=S_FALSE then showmessage('OK') else showmessage('ERROR!!!!!!!!!!!!!!!!');
end;
for the full problem I have made an MCVE: the server: enter link description here the client: enter link description here