Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error handling and kill with COM
Message
 
To
05/07/2004 20:14:00
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00920870
Message ID:
00920922
Views:
25
This message has been marked as the solution to the initial question of the thread.
COMRETURNERROR() in App 2?

A guess - App 1 should not ask for data if the network is down.

>I have 3 apps:
>
>App#1 uses app#2 (the COM object), to retrieve and create some subset of the data maintained by app#3, as needed.
>
>In app#1 at startup, I create the COM object and keep in a global variable, the reference to this COM object.
>
>App#1 is mobile (i.e like a laptop).
>App#2 is a DLL residing on the mobile machine.
>App#3 is on the server.
>
>The mobile unit uses a wireless network.
>
>Issue: Dealing with instances where app#1 asks for data but the wireless network is down.
>
>Example:
>Network is up
>App#1 successfully "creates" app#2
>Network goes down
>Network comes back up
>App#1 asks for data
>App#2 provides the data
>No problems as long as App#1 does not ask for data WHILE the network is down.
>
>BUT,
>Once app#1 asks for data WHEN the network is down, I can not recover. Even if the network comes back up, I get errors indicating the COM object no longer exists.
>
>Possible solution:
>Immediately below any line of code that access the COM object, check for an error. If an error exists, KILL the process (I cannot release it because the network is down). Then attempt to recreate the COM object. I could live with this but do not have any idea how to KILL the process. I have read a lot of postings on KILL I can't seem to relate them to my process.
>
>Truth is the above may be A solution but I could be way off base. Could it be that my COM object should be returning values indicating success or not? Perhaps this is true but my problem still remains. It does return the VFP error code now. Perhaps I just do not understand why, when the network comes back up, my reference to the COM object seems useless.
>
>Thanks,
>John
Imagination is more important than knowledge
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform