S
Saga
Hello all. On this occasion I would like to get your opinion on how best
approach a specific design requirement.
The VB2008 app that I am developing uses a legacy ActiveX EXE
server to return some data. The code instantiates the server object
and runs it. When the server is done it fires an event in the calling
code. Since it is asyn-chro-nous** the code after calling the server simply
keeps executing after the server begins processing.
Currently, the app is executed, the server started and then the app exits. I
need to keep the app alive while the server is running so that there is
something there when it finishes processing and fires the event. One idea
is to implement a service that is always running.
Is this the best way to do this? I had originally envisioned a console app,
running from Main(), doing the work, calling the Active X EXE and then
exiting, but I do not know how to keep the app from terminating before
the server is done and fires the event. I want to avoid a do-nothing loop
that polls some flag that is set when the ActiceX EXE's event fires,
looking for a better way.
One requirement is that the app needs to be able to run when the user
is log.ged out, so it can't be a typcal forms app.
Any ideas, recommendations, further reading references or feeback is
welcomed. Thanks! Saga
** I had to hyphen this word because for some reason, if I leave it
whole, the post is censored and does not go through. Go figure!
approach a specific design requirement.
The VB2008 app that I am developing uses a legacy ActiveX EXE
server to return some data. The code instantiates the server object
and runs it. When the server is done it fires an event in the calling
code. Since it is asyn-chro-nous** the code after calling the server simply
keeps executing after the server begins processing.
Currently, the app is executed, the server started and then the app exits. I
need to keep the app alive while the server is running so that there is
something there when it finishes processing and fires the event. One idea
is to implement a service that is always running.
Is this the best way to do this? I had originally envisioned a console app,
running from Main(), doing the work, calling the Active X EXE and then
exiting, but I do not know how to keep the app from terminating before
the server is done and fires the event. I want to avoid a do-nothing loop
that polls some flag that is set when the ActiceX EXE's event fires,
looking for a better way.
One requirement is that the app needs to be able to run when the user
is log.ged out, so it can't be a typcal forms app.
Any ideas, recommendations, further reading references or feeback is
welcomed. Thanks! Saga
** I had to hyphen this word because for some reason, if I leave it
whole, the post is censored and does not go through. Go figure!