Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling a out-process from VFP...
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00436732
Message ID:
00437295
Views:
24
>>I create a VFP app with OLE Public calls and I compile it as a COM Server (EXE).
>>Then from my application I can call this COM and start a Method that will run will the caller app. continue? Right?
>
>If I understand your question correctly, the VFP process will be blocked while waiting for the COM object's method to complete. In other words, no, VFP will not continue executing while waiting for the COM object.
>
>In order to accomplish what I think you're trying to do, you would need to create a stub EXE that you could call from VFP with the Run command. This EXE would create the COM object and call the method in question. You could make this EXE using VFP, or if you want a compact EXE you could create one in C++ fairly easily. If you want to return some kind of value to VFP, it would get a bit tricky, but you could accomplish this using several methods, such as writing results to a text file.
>
>I hope that answers your question.

I ned to unpack data from a CD but wait for it to get done before I continue.
I use the following:

lcOutData = 'c:\temp\data.exe'
* The user has the WScript.Shell to use
oShell = CREATEOBJECT("WScript.Shell")
* Run the data.exe and tell it to be in a normal window and to wait until the program is done
*
oShell.Run(lcOutData, 1, .T.)
* We are done with the object
RELEASE oShell
* Just to be safe lets erase the data.exe file used in case the data.exe did not
Bret Hobbs

"We'd have been called juvenile delinquents only our neighborhood couldn't afford a sociologist." Bob Hope
Previous
Reply
Map
View

Click here to load this message in the networking platform