Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GetObject once more
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
01071961
Message ID:
01071988
Vues:
27
>In the remote computer DCOM is running ( calling by CreateObject ) all time I wona only call an existing instance this DCOM. It is possible ?
>
>Best regards

Ah! For this you need another trick, at least I solve this problem with a trick, not sure if there is a better way.

What I did was creating a Proxy Object which only mission is to return the running COM using GetObject (for this you need to solve the GetObject bug as pointed out earlier), this is an schematic of what I did:
[Computer 1 (Server)]   [Computer 2 (Client)]

myDCOM                  Create an Instance of myProxy in Computer 1 and thru it get a reference of the running myDCOM (Using CreateObject)
myProxy
----------------------------------------------------------------------------------------------------------------------

myProxy has only one method called getMyDCOM() that will make the actual call to GetObject(, 'myDCOM.Application')
In this way I am able to grab an instance of a COM object that is already running in a remote computer
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform