Jump to content

sharing info over multiple programs


evk
 Share

Recommended Posts

I'm running a program that loops continuously reading data over a comm port and writing it to an ini file. Another program reads this information and uses it to perform some complicated action. The problem is that when both programs try to access the file at the same time, the program that needs the input bounces back the default parameter in the iniread. <-- that is a very bad thing for the program (unexpected action). Does anyone have any suggestions to completely eliminate this problem? Thanks.

Link to comment
Share on other sites

Hi!

Couldn't a simple loop like this solve the problem?

Do
    $data=IniRead("bla.ini","section","key","error")
Until $data<>"error"

.. Or if you want to share data directly between programs you can use several methods.

  • ReadProcessMemory/WriteProcessMemory
  • Pipes
  • Mutex
  • Messages

Search around for them, they are used quite often :)

Broken link? PM me and I'll send you the file!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...