Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error #75 at Open {file} For Input As #1 (need 2 progs on same PC to communicate)
#4
One thing you might consider is to write a "Last Used By" Variable at the top of the code.

PUT #1, , UsedBY 
PUT #1, , Data_to_Transfer

Now, whenever you look at the file, you can tell from that first set of bytes if it's available for read/write or not.

If those bytes are:

00 -- then there's no read/writing going on.  The file is in a blank slate and either side can write to the file.  There's nothing to read.
01 -- the first file is now accessing this data.  The 2nd one should wait for it to finish whatever it's doing.
10 -- the second file is now accessing the data.  The 1st program should now wait for it to finish whatever it's doing.

When one file needs to do something, it always checks the status of that first byte to make certain that the file is ready for it to send/recieve data, and thus doesn't try to access it while the other program is manipulating the data in that file, until its finished.
Reply


Messages In This Thread
RE: Error #75 at Open {file} For Input As #1 (need 2 progs on same PC to communicate) - by SMcNeill - 05-23-2024, 04:59 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Mac debugger not connecting, a user error! BlameTroi 0 110 02-07-2026, 06:18 PM
Last Post: BlameTroi
  ERROR MESSAGES COLORS ? aurel 5 399 01-02-2026, 11:26 AM
Last Post: aurel
Question Converting input from other devices to standard PC gamepad analog input? madscijr 0 178 01-01-2026, 06:39 PM
Last Post: madscijr
  Using CONST & _RGB used together seem to error... Dav 12 716 12-12-2025, 12:29 AM
Last Post: Dav
  error doing image collision detection with _MemGet madscijr 55 4,795 10-01-2025, 03:25 PM
Last Post: bplus

Forum Jump:


Users browsing this thread: 1 Guest(s)