Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21297

Communicate between separate program through ini file

$
0
0
I made VB6 program and C# program.
Those 2 program should communicate with each other through Profile(Ini file).
Once VB6 write flag(for example "N") in the ini and call C# program, which do something.
If C# program terminate its work, write flag in the ini file and terminate process by itself.
While C# do its work, VB6 check if the flag in the ini file become "Y".
VB6 check this at every 0.5sec in the loop.
Read/Write of ini is performed by WritePrivateProfileString and GetPrivateProfileString.
But I'm worring that some kind of concurrent access of ini file by 2 program(VB6 program and C# program), which may generate some undesirable result.
Can I lock ini file while one process is writting?
If possible, how could I check if the ini file is locked from the counterpart(another) program?

Viewing all articles
Browse latest Browse all 21297

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>