Re: SafeArray Locked error (General questions)
Hi,
I believe this is now fixed. Can you please download the latest version and try it out?
Also, you can try the following code (instead of yours):
[code]procedure TForm1.Button4Click(Sender: TObject);
var arraydata : Pointer;
v : Variant;
n : integer;
data : pointer;
buf : array [1..1024] of char;
begin data := @buf;
n := 500;
v := VarArrayCreate([0, n-1], varByte);
arraydata := VarArrayLock(v);
Move(data^,arraydata^,n);
VarArrayUnlock(v);
wodVPN1.SendData(v, FALSE); // not reliable
VarClear(v);
end;[/code]
Regards,
Damba