Good morning.
This is a weird question, I know, but be patient with me, please! :-)
Scenario
Years ago I made a simple C# console application (call it MyApp, myapp.exe) that does some work for a big COBOL application (call it CblApp).
This app generally read some files, do requested work (like calling web services, etc..) and writes some output files.
Interaction with CblApp works in this manner:
- CblApp calls myapp.exe, for example myapp.exe -i:readinputfilefile.xml -w:writeresults.xml
- CblApp blocks itself until myapp.exe is closed (synchronous way)
- When myapp.exe finished and closes itself, CblApp read result files
MyApp is plugin based, and now it is a monster with 40 plugins, logging, ineternet connection check, etc...; loading it every time from scratch takes a while, so I created a new version that works as a single istance application with tray icon.
Nice, but CblApp can't use it: CblApp can't change his way to interact with myapp.exe.
Question
Now the question: can I simulate to the CblApp that myapp.exe is closed without really doing it?
Now I wrote a fake myapp.exe tha calls the single istance app, waits until work is done, than closes itself, but I don't like this solution.
Hope someone will undestand this tangled question. :-)
Thanks!
Nando