A
argami
I have a com delphi exe, with this code:
TMyRecord = Record
a:Integer;
end;
function RecordToVariant(r: TMyRecord):OleVariant;
var
P
ointer;
begin
result :=VarArrayCreate([0, sizeof(TMyRecord)], varByte);
P := VarArrayLock(result);
Move(P^, result, sizeof(r));
VarArrayUnlock(result);
end;
so i use this code in 1 function like
procedure SomeFunction(var v:OleVariant);
var
myRecord:TMyRecord;
begin
myRecord.a := 1;
v := RecordToVariant(myRecord);
end;
Ok my problem is i can't change this code. In my c# consuming client
I've to use SomeFunction geting this olevariant like object but i dont
know how to extract this record to another c# struct with the same
members.
Anybody can help me?????
TMyRecord = Record
a:Integer;
end;
function RecordToVariant(r: TMyRecord):OleVariant;
var
P

begin
result :=VarArrayCreate([0, sizeof(TMyRecord)], varByte);
P := VarArrayLock(result);
Move(P^, result, sizeof(r));
VarArrayUnlock(result);
end;
so i use this code in 1 function like
procedure SomeFunction(var v:OleVariant);
var
myRecord:TMyRecord;
begin
myRecord.a := 1;
v := RecordToVariant(myRecord);
end;
Ok my problem is i can't change this code. In my c# consuming client
I've to use SomeFunction geting this olevariant like object but i dont
know how to extract this record to another c# struct with the same
members.
Anybody can help me?????