G
Gary Nelson
Anyone have any idea why this code does not work?
FileOpen(1, "c:\JUNK\MYTEST.TXT", OpenMode.Binary,
OpenAccess.ReadWrite, OpenShare.Shared)
Dim X As Integer
For X = 1 To 26
FilePut(1, Chr(X + 64))
Next
Lock(1, 5, 10)
When it hits the lock I get this message:
An unhandled exception of type 'System.ArgumentOutOfRangeException' occurred
in mscorlib.dll
Additional information: Non-negative number required.
I ran into this problem in a program I'm trying to port from VB6. I created
this simplified code to illustrate the problem.
Does VB.Net not support file locking????
Gary
FileOpen(1, "c:\JUNK\MYTEST.TXT", OpenMode.Binary,
OpenAccess.ReadWrite, OpenShare.Shared)
Dim X As Integer
For X = 1 To 26
FilePut(1, Chr(X + 64))
Next
Lock(1, 5, 10)
When it hits the lock I get this message:
An unhandled exception of type 'System.ArgumentOutOfRangeException' occurred
in mscorlib.dll
Additional information: Non-negative number required.
I ran into this problem in a program I'm trying to port from VB6. I created
this simplified code to illustrate the problem.
Does VB.Net not support file locking????
Gary