Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unstable out-of-process COM server releasing
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Unstable out-of-process COM server releasing
Divers
Thread ID:
00332251
Message ID:
00332251
Vues:
41
In my application I needed to provide the following feature:
the user runs the application, then from a popup item he can launch a new occurance of the same application skipping the login part, and so on (from any occurance he can launch a new one). The user can exit from any occurance N: 2,...,N at any time, exiting from the first occurance closes everything.

I added a new formal OLE public class where I moved my setup environment code. From within the project I create an object from that class using it as a normal class, everything works.

I created a new small project which launches the first occurance and manages the other ones (creating objects from my COM server class). I have there an array of references to the occurances.

At first sometimes I was getting 'Cannot quit Visual Foxpro' (even though any references anywhere cleared) and a pending process in the windows tasks list (launched pressing Ctrl+Alt+Del), then I put 'on shutdown quit' just before exiting from a process and this message disappeared, but I still have pending processes SOMETIMES (that's the problem). Also sometimes I get "App performs illegal operation" from the windows after exiting from an occurance.

For example, launching the first occurance only a pending process may happen at the 5th time i do that, it may happen at the 9th. 3-4 times i did both ( A) and B) )of the following:
A) instance 1 -> inst.2 -> inst.3 / exit from 2 / exit from 1 (i.e. 1 + 3)
B) instance 1 -> inst.2 -> inst.3 / exit from 3 / exit from 1 (i.e. 1 + 2)
Every time A) produces a pending process, while B) doesn't. Does that mean it's recommendable the instances to be closed in the order they are launched (actually it's impossible because the user can exit from any of them at any time).

Any ideas for fixing this?

TIA
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform