Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting a handle to the current instance
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Divers
Thread ID:
01005114
Message ID:
01005700
Vues:
14
ok I seem to have got it, I don't really get it, but I've got it.

if i create a basic com server lets say a form set to ole public, and then a client that does an ox = createobject(bla) and then ox.show() it works fine.

I start the client and a server form will pop up aswell.

the second client I open then pops up a second server form, I thought that strange, it should be attached to the first one, looking in the process list there is only one server process and two clients, so it gets confusing.

so I put a button on the clients to fire text onto the server form, with one open it does this, when I open the second server both clients output the text to the second opened form when I close the clients one by one all the server forms close one by one and when the last one goes so does the server process.

it's as if there is some kind of server method on a createobject that gives out the same process but pops up a new form each time and makes it the activeform, as they close each older one becomes active.

I can hide this activity by having a starter client with the show() in it that way the rest work, but I'm pretty sure more goes on than I want.

so I wonder, if I change to the session class as my ole public and have a separate form will I get around this sufficiently? just how much 'stuff' is created with each new client when all I'm looking for is a handle into the com object.

I imagine I wouldn't have the same issues if getobject would work?

again, can anyone advise?

Ken.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform