Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple DCOM questions
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00448014
Message ID:
00448111
Views:
10
>Nick,
>
>
>>On NT or Windows 2000 DCOM works fine, you are just having the security setup problems. Your DCOM users must have accounts and proper access rights on the server PC. Of course you can allow access to Everyone, but one day somebody will be smart enought to issue
>>
>>oVFP.DOCMD("ERASE *.*")
>>
>>for your System32 directory. :)
>>The security settings should be set in DCOMCNFG at the system level and on the DCOM component level.
>
>I added permissions for the user logged into the win98 machine in dcomcnfg on my nt workstation, and was able to start the server. I was unable to get it to do what it's supposed to once it started, but at least I was able to start it without any problems. I got no errors when running createobjectex from the win98 box, and was able to see dfox.exe in my processes list on the nt box until I release the object on the win98 box.
>
>I still have a couple of questions though. If I instantiate a dcom server from a remote box, should I reference files through a share on the server box, or with a path local to the box on which the server sits?

You should use SET PATH in your DCOM code to set the right path in the server PC context. By default your DCOM starts in your SYSTEM32 directory. Don't use
CD mydatadirectory. You may also have yourDCOM.cPath property with cPath_Assign Assign method which will automatically set the provided path if you want to set it after you instantiate your DCOM.

*Code in client application
omyDCOM = CREATEOBJECTEX("myDCOM.Test1", "MYSERVER")
oMyDCOM.cPath = "C:\myserverdatadirectory" &&  or somepathproperty. 
* Can be obtained interactively 

***cPath_Assign method in DCOM class
LPARAMETERS vNewVal
THIS.cPath = vNewVal
SET PATH TO (THIS.cPath)
This way you will be able to run yor DCOM with different data sets from different directories on the server.


>Also, is there some way to get the server to show up under applications in dcomcnfg with the ability to set the security context, etc... specifically for that server?
>

You probably didn't give the description for your DCOM class, so it should be in the DCOMCNFG list not under the name, but under its CLSID.
Check your COM object CLSID in its .VBR file and find it in the DCOMCNFG list.
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