how to go about...
-
Hi, How to go about getting data from another running application? This is wat I am trying to do. There is program A running and storing data in the hard disk. I am creating a program which will retrive the real time data. This means that when i open the program, it will retrive the current data that program A is recording. However I do not run program B when A is running. I will run B as and when needed. Any idea? :confused: Aaron
-
Hi, How to go about getting data from another running application? This is wat I am trying to do. There is program A running and storing data in the hard disk. I am creating a program which will retrive the real time data. This means that when i open the program, it will retrive the current data that program A is recording. However I do not run program B when A is running. I will run B as and when needed. Any idea? :confused: Aaron
You can't - if program A is writing to disk, it will own the file until it closes it. Are you writing both programs ? If so, you should look into some interprocess communication to send this data, bypassing the file. Otherwise, you can't do it so long as program A has the file open. Christian Graus - Microsoft MVP - C++
-
Hi, How to go about getting data from another running application? This is wat I am trying to do. There is program A running and storing data in the hard disk. I am creating a program which will retrive the real time data. This means that when i open the program, it will retrive the current data that program A is recording. However I do not run program B when A is running. I will run B as and when needed. Any idea? :confused: Aaron
Did you wrote program A? If not, than you might be in some trouble. If you wrote program A, you should change the part where you open the file for writing and modify it so it shares access to it. Read here[^] for more information on sharing files. If you did not write program A, you can try to open the file that shares all access to it. This way, there might be a chance that you can access the file if program A did not deny all access.. Good luck. Behind every great black man... ... is the police. - Conspiracy brother Blog[^]
-
Did you wrote program A? If not, than you might be in some trouble. If you wrote program A, you should change the part where you open the file for writing and modify it so it shares access to it. Read here[^] for more information on sharing files. If you did not write program A, you can try to open the file that shares all access to it. This way, there might be a chance that you can access the file if program A did not deny all access.. Good luck. Behind every great black man... ... is the police. - Conspiracy brother Blog[^]
-
ok tks will look into the share format of the file. If i set it to share read, logically it should work. rite? Aaron
Maybe, if the other program didn't open the file without sharing the file for writing. I think that it is better to open the with sharing all access. That way, you will be sure that you don't deny some access that program A has. Also be sure to open the file READ_ONLY. Behind every great black man... ... is the police. - Conspiracy brother Blog[^]
-
You can't - if program A is writing to disk, it will own the file until it closes it. Are you writing both programs ? If so, you should look into some interprocess communication to send this data, bypassing the file. Otherwise, you can't do it so long as program A has the file open. Christian Graus - Microsoft MVP - C++
Not true, you can set the "sharing" parameters so another application can read from a file while you write to it. 8bc7c0ec02c0e404c0cc0680f7018827ebee