|
-
Mar 3rd, 2001, 06:45 PM
#1
Thread Starter
New Member
Hi. I'm working on a project that modifies a data file used by another program. I always get "file in use" or "sharing error" whenever I try to write to the file. I imagine this is because the other program has locked the file... is there any way to "un-lock" the file and make it available to my program for modifying it?
I don't know if it is possible, but I would like it if it could be. I am not interested in using code that will terminate the other program.
- vb newbie
-
Mar 3rd, 2001, 07:07 PM
#2
Monday Morning Lunatic
The usual case is not that the other program has specifically locked the file, but because it has the file open for reading/writing, which immediately prevents any other programs from accessing it.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Mar 3rd, 2001, 08:35 PM
#3
Thread Starter
New Member
yeah but
Oh. I have no clue whether it has locked it or what, but I would like to be able to access the file -- is this possible?
Would it instead be possible to Open the file with my program and set the Shared setting so that both programs could modify it? (or would that still not work if both were accessing it)
-
Mar 3rd, 2001, 08:41 PM
#4
Monday Morning Lunatic
It won't make any difference, I'm afraid. Think about it...the other program is writing to the file while your program's reading. How do you tell what data your program will get? Is it the data from before or after? Or is it parts of both? It's impossible to tell.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Mar 3rd, 2001, 11:11 PM
#5
Thread Starter
New Member
yeah
actually the program is a game that uses a data file that needs to be modified to play different missions. The game only reads from the data file, and I need to be able to write to it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|