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
Complete thread:
- SafeArray Locked error - forthyen, 2008-01-14, 17:25
- Re: SafeArray Locked error - woddrazen, 2008-01-14, 17:52
- Re: SafeArray Locked error - forthyen, 2008-01-15, 02:31
- Re: SafeArray Locked error - wodSupport, 2008-01-15, 02:34
- Re: SafeArray Locked error - forthyen, 2008-01-15, 03:57
- Re: SafeArray Locked error - woddrazen, 2008-01-15, 08:49
- Re: SafeArray Locked error - forthyen, 2008-01-15, 08:54
- Re: SafeArray Locked error - wodDamir, 2008-01-15, 16:48
- Re: SafeArray Locked error - forthyen, 2008-01-15, 17:13
- Re: SafeArray Locked error - wodDamir, 2008-01-15, 16:48
- Re: SafeArray Locked error - forthyen, 2008-01-15, 08:54
- Re: SafeArray Locked error - woddrazen, 2008-01-15, 08:49
- Re: SafeArray Locked error - forthyen, 2008-01-15, 03:57
- Re: SafeArray Locked error - wodSupport, 2008-01-15, 02:34
- Re: SafeArray Locked error - forthyen, 2008-01-15, 02:31
- Re: SafeArray Locked error - woddrazen, 2008-01-14, 17:52