Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
The application is written in C, linking in the commode.obj modules
I believe this is do to the “delayed cache write” behavior of windows, but need a work around.
The scenario is as follows:Works:
Program 1 starts
Program 1 opens file A
Program 1 close file A
Program 1 exits
Program 2 starts
Program 2 opens file A
Program 2 close file A
Program 2 exitsFails:
Program 1 starts
Program 1 opens file A
Program 1 close file A
Program 2 starts
Program 2 tries to file A ……. file busy error … enter a loop retry open every second
Note Program 1 still runningNow terminate program 1
Program 2 opens file A successfully
Program 2 close file A
Program 2 exits
Now we have tried liberal doses of flush but they do not seem to have any affect.Suggestions?
Regards
Carl

Alternative 1
Try sopen. That will open for shared access.Alternative 2
Try mailslots for sending stuff between the programsAlternative 3
Try shared memory for sending stuff betwen the programsAlternative 4
Try pipes for sending stuff between the programs.

All good suggestions, but unfortunately not practical.
I have many codes, on the order of 200, that called in optimization loops.
I just really need to close and free a file completely from with a running program.
Never thought that she be so hard…

![]() |
VBA/Excel Dynamic cell re...
|
How do I detect keystroke...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |