DDE
-
Hi All, I have 2 separate applications say X1 and X2, X1 receives all the data and stores it in a file now this file should be opened through X2 Consider for example, GetLogic() fn. in X1 gets the logic from the device and stores it into a file and immidiately this file should be opened through X2 This should happen at run time User intervention will come only once when he selects GetLogic() I beleive that DDE should be made used but anyone can explain me the procedure or if there is any other method?? Thanks Uday
-
Hi All, I have 2 separate applications say X1 and X2, X1 receives all the data and stores it in a file now this file should be opened through X2 Consider for example, GetLogic() fn. in X1 gets the logic from the device and stores it into a file and immidiately this file should be opened through X2 This should happen at run time User intervention will come only once when he selects GetLogic() I beleive that DDE should be made used but anyone can explain me the procedure or if there is any other method?? Thanks Uday
DDE is somewhat of an outdated technology, there are better ways to do interprocess communication in Win32. You could do a number of things to signal your app X2 that the file has been written by X1 including the following: 1. X1 can find a windows handle to your X2 app and send that window a message when it completes its task. 2. Both apps would register a custom message with the function "RegisterWindowMessage". Both apps would pass in a special string that hopefully only your app will register, and when X1 completes its task, it can broadcast the message that is returned from the api and X2 should handle that message. 3. Create a named event in both applications, and X2 will user WaitForSingleObject or some other wait function and wait for the event that you create. I think I would choose solution 3. There are other possibilities as far as application synchronization, these are just a few that I thought of off the top of my head. Good Luck
Build a man a fire, and he will be warm for a day
Light a man on fire, and he will be warm for the rest of his life!