| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | VP/2 Bug. |
Hi,
I've found a bug in VP/2's blockwrite. If you try to write to a
pre-existing file (ie: open with reset), you get an OS/2 error 5 (access
denied). I beat my head against the wall for a long time till I reduced
the situation to the following test. Compiled by TP 6.0, it runs properly
in DOS, but the VP/2 build fails in OS/2 as shown.
var
f : file;
b : byte;
{$IFDEF OS2}
size, count : longint;
{$ELSE}
size, count : word;
{$ENDIF}
begin
b := 0;
assign(f,'tempfile');
rewrite(f,1);
blockwrite(f,b,sizeof(b),count);
close(f);
reset(f,1);
size := filesize(f);
seek(f,size);
blockwrite(f,b,sizeof(b),count); {gets OS/2 error 5 here}
close(f);
end.
Cheers,
Rich
http://www.netside.net/~rveraa/
* Origin: Every bird of prey wants to consume its booty in comfort (1:135/907)SEEN-BY: 50/99 270/101 620/243 625/100 711/401 409 410 413 430 808 809 934 SEEN-BY: 711/955 712/407 515 517 628 713/888 800/1 @PATH: 135/907 71 292 992 3615/50 396/1 270/101 712/515 711/808 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.