Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DCOM on the Server
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00757766
Message ID:
00760722
Views:
16
>Nick,
>
>Do I also have to register it on the local machine?
>
>And, do I call it as follows:
>
>LOCAL lcCLSID, lcComputer
>lcCLSID = "{98DD4641-2315-11D3-941F-0050041DCB6C}" && CLSID from vbr file
>lcComputer = "\\NT1"
>loDFox = CREATEOBJECTX(lcCLSID, lcComputer)
>

If you use CREATEOBJECTX and specify the machine name/IP address where to run it, then it is not required. However it is recommended that you register your DCOM locally with
clireg32 myDCOM.VBR. 
The main purpose of registering COM on the client is to speed up the execution. If DCOM type library is registered on the client, then there is no need for the round trip to the type library registered on the server just to check out the COM interface.

Each time you reference some DCOM property/method somewhere means that it is looked up in the type library. If the type library is registered only on the remote server, that means that the corresponding lookup request goes there, which may be time consuming. This is also a reason to always shorten the DCOM property/method reference as much as possible, for example using WITH... ENDWITH

Also, if you did not see the following articles yet, I would recommend them.
"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
Previous
Reply
Map
View

Click here to load this message in the networking platform