Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Automation between 3 computers
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01092790
Message ID:
01093157
Vues:
18
>Let's say I have an automation server that runs on a computer B. That server was started from computer A using CREATEOBJECTEX command. Is there a way to 'connect' computer C to the server from computer B?

Maybe <g>...

You should be able to create an instance of server C in Server B and then pass that instance back to Server A. Server A should then be able to call Server C.

You can use a factory method in Server B to return the reference:

FUNCTION GetServerC()
IF ISNULL(this.oServerC)
this.oServerC = CREATEOBJECTEX("ServerC.ServerC","SERVERC")
ENDIF
RETURN this.oServerC
ENDFUNC

In server A:

loServerB = CREATEOBJECTEX("ServerB.ServerB","ServerB")
loServerC = loServer.GetServerC()

I haven't tried this but it's easy enough to try out. I'm not sure how the COM marshalling of this would work out but if it works the marshalling would be from A -> B's Proxy -> C...

The tough part will be permissions. If you try this make absolutely sure you can access the ServerB from A and ServerC from B before trying the Factory code.

+++ Rick ---
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform