>Hi
>
>I wish to setup a VFP COM DLL/EXE on another PC/Server, so that I can access the object remotely from client PC's.
>
>How do I do this? Any useful articles?
>
>Thanks
>Kev
Hi Kevin,
What operating system you are going to use?
For COM EXE basically you need:
- 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
- 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")
To run COM DLL on the remote server you need to use (depending on operating system) - Component Services for Win 2000/Win XP or Microsoft Transaction Server for older ones.)
You can also use CLSID from the VBR file instead of "mydcom.myobject".
The tough part may be setting up the security/access rights. Firewalls may interfere with your DCOM calls too.
Firewalls, programs like ZoneAlarm may prevent the DCOM from working. You can find a lot of info about security settings in:
-"Access COM objects over TCP/IP" by Rick Strahl in November issue of FoxPro Advisor.
another version of the article is at
http://www.west-wind.com/presentations/internetenabling/InternetEnabling.htmCheck also the articles:
-"HOWTO: Use a Windows 95, Windows 98, or Windows Me Computer as a DCOM Server"
http://support.microsoft.com/default.aspx?scid=KB;en-us;q165101-FoxPro Advisor September 2000
-"Microsoft Visual FoxPro and Advanced COM"
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfoxgen7/html/vfpandcom.asp-"Using Distributed COM with Firewalls"
http://msdn.microsoft.com/library/backgrnd/html/msdn_dcomfirewall.htm
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