Re: SafeArray Locked error - WeOnlyDo Discussion board

Re: SafeArray Locked error (General questions)

by wodDamir, Tuesday, January 15, 2008, 16:48 (6156 days ago) @ forthyen

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


Complete thread: