|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Running an ActiveX EXE from VB2008 appapproach 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! On 4/21/2010 5:44 PM, Saga wrote:
Show quoteHide quote > Hello all. On this occasion I would like to get your opinion on how best It would seem you could create a timer that simply ticks every second or > 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! > > so while your code is waiting for the event from the server. Once the server event is handled, disable the timer. I may be oversimplifying your problem though. -- Mike Thanks for your reply.
> I may be oversimplifying your problem though. Maybe, but it is worth a try to see the result. I will follow up when I testyour suggestion. Saga Show quoteHide quote "Family Tree Mike" <FamilyTreeM***@ThisOldHouse.com> wrote in message news:O4oDEHo4KHA.5464@TK2MSFTNGP05.phx.gbl... > On 4/21/2010 5:44 PM, Saga wrote: >> 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! >> >> > > It would seem you could create a timer that simply ticks every second or > so while your code is waiting for the event from the server. Once the > server event is handled, disable the timer. I may be oversimplifying your > problem though. > > -- > Mike
Run Unix shell script from VB.NET
Is that a blank in your TextBox ... How to build the form with details button? Upgrade 2008 to 2010 MailMessage message size problem in saving image How Does ComboBox Determine What To Display? vb.net 2008 display and print directory/subdirectories Foreign Currency Exchange Rates Web service Get email with Visual Basic 2008 |
|||||||||||||||||||||||