Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CreateObject() a COM Server in another PC
Message
De
09/04/2001 17:21:50
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00493764
Message ID:
00493798
Vues:
11
>>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.

IMO, it's better to build the component as a DLL and host it in COM+. This will allow Component Services to handle instancing and make the client setup easier.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform