Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CreateObject() a COM Server in another PC
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00493764
Message ID:
00493789
Vues:
14
>Hi All:
>I'm building a COM server in VFP6. This server will run on a Windows 2000 Advanced Server mchine, but I and other users will access this COM server from another machines. The question is: How I instantiate (CreateObject) the COM server from another machine?
>
>TIA

You should:

- build your DCOM as EXE
- copy MyDCOM.exe,MyDCOM.VBR and MyDCOM.tlb to a directory on the server (if EXE was not built there)
- register it on the server by running MyDCOM.exe -REGSERVER
- set up the security options for it through DCOMCNFG.EXE
- run Automation Manager (autmgr32.exe) on server PC
- copy MyDCOM.VBR to the client PC
- register your DCOM on the client PC with clireg32 myDCOM.VBR

- Instantiate your DCOM:
oDCOM = CREATEOBJECTEX("mydcom.myobject" ,"//MYSERVER") && //MYSERVER or it's IP address.

You can also use CLSID from the VBR file instead of "mydcom.myobject".

(Erik Moore will tell you that you don't have to register your DCOM on the client :) and you can use CREATEOBJECT() function instead of CREATEOBJECTEX() and that's true. But there may be performance penalty for this. See this thread for the thorough discussion on this.)

The tough part may be setting up security/access rights. Firewalls may interfere with your DCOM calls too.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform