Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to have UI in COM EXE?
Message
From
13/12/2000 10:49:23
 
 
To
13/12/2000 10:33:01
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00452834
Message ID:
00452843
Views:
22
John,

> How could I have UI in COM EXE? I tired to DO FORM in my COM EXE, but the form doesn't appear. Instead, MESSAGEBOX() appeared in my testing. I have diabled "unattended execution", but still the same.
> Again, once my COM EXE running, my client program failed to response to user interaction. How can I allow my program to press "cancel" button in my progress form to cancel the long process in my COM EXE?

Any UI in your COM EXE will be on the computer where the EXE runs. If that is the same computer as your client application, it will run in a separate process, so your client program will not display the form. If the EXE is on another computer, the UI would show there.

If you want your client application to communicate back and forth with the EXE, you will need to do it with method calls, or checking/setting the value of properties in the COM, but that probably will not work while the long process is running in the COM object, since your client program will still be hung, waiting for the COM to return control.

I think you might want to consider a more disconnected approach, where you have a COM EXE running already, which looks in a directory for incoming message files (could be in XML), acts on them, and then leaves a file indicating the process is finished or giving a result (which can be read by your client program, which could check for that result rile). You could have the long COM process check for a cancel message file periodically, created by your client program when you click CANCEL.

All of the above communication can be done with Message Queue services (MSMQ), which you can read about in white papers at the Microsoft Visual Foxpro site, and also at www.west-wind.com.
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Previous
Reply
Map
View

Click here to load this message in the networking platform