Click here to Skip to main content
15,917,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a program that I am opening files in via system() calls from c++. When it opens for the first time, it runs about 5 minutes of tests before it can start.

The command line argument I'm using to open these files is "program.exe -lfile.mpt".

The problem I'm having is that this program does not allow two instances open at once, but if I close it and reopen it, all the start up tests would have to be ran again.

So what I'm looking for is a command line argument I can use to open a file in this program on a process that is already running. I'm assuming it will be something along the lines of "(PID) -lfile.mpt".

Thanks in advance,
Pat

EDIT:
What I have tried so far is "net share mpt=c:\MPT" (sharing the directory where programs.exe is). I'm not sure where I should go from here, anyone have any ideas?
Posted
Updated 3-Aug-11 5:02am
v2

1 solution

you must open the file in shared mode, or close it in one instance.
 
Share this answer
 
Comments
obp42 3-Aug-11 10:24am    
Can you explain how to do this?
KarstenK 3-Aug-11 10:27am    
use the right flag when opening the file

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900