Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multitasking from VFP
Message
 
 
To
15/07/2004 08:44:07
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00924617
Message ID:
00924768
Views:
19
>I have a VFE/VFP/COM app. I use it as a dll.
>
>I use this dll from inside a 2.6 style program that is part of a 2.6 style application (EXE). Everything runs under VFP 7.0 and WinXP Pro.
>
>I use the dll to perform database processing. It basically "views" data and is used to update data in that database. This database is otherwise maintained by a different VFE/VFP app. So basically I have a COM object that is used from my 2.6 app, to access the database maintained by a different app.
>
>In my 2.6 app, I use the COM object to pull some data. I can not wait for the data to be delivered (approx. 8 seconds). I need to "ask" for the data and move on to do other things.
>
>I suppose I could modify the COM object to do something, that the 2.6 app could check regularly, to see if the COM object has completed it's data delivery task yet.

How does your 2.6 App invoke the COM object? I do not recall CreateObject() being part of 2.6 or does your "Everything runs under VFP 7.0" mean you have 2.6 code with a few lines of OO code? (I'm going to assume this is the case).

One approach might be to switch from a DLL to an EXE and then use the RUN /N command (perhaps with command line arguments) to start the VFP App. The 2.6 code could then poll a common DBF (or file) to look for a status or whatever it is that indicates completion.

If you have to stay with a COM object for the VFP process then I think you will have to move from a DLL to an EXE. This is because functionality inside a DLL runs 'in-process' relative to the host EXE. In VFP's case this precludes multi-threading / multi-tasking. Functionality in an EXE runs in its own process space i.e. it runs independently of the process (EXE) that invoked it.

That’s not exactly a dissertation but hopefully helps a little.
censored.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform