Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DCOM or COM?
Message
From
19/04/2001 13:53:26
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Miscellaneous
Thread ID:
00497236
Message ID:
00497452
Views:
11
>>I have created a COM object that will be used from within an application and outside the application. (It's a middle-tier data warehousing object.) It was originally written for a specific client to be used outside the application, but now mangement wants to include it with the application. So, what's the problem? Most of the clients already have the application installed, and to use it as a com object, they would have to install it and register it on each client machine. The other option is to install and register it on the server once and use createobjectex(). The problem is the name of the remote server (machine name) will be different for each installation. Is there a way to get the machine name of a remote server programmatically? Does anyone have any suggestions?
>
>I'm not sure I understand the problem. Can't you make the createobjectex() call variable? Store the name of the remote server in a table (or registry value), retrieve it and use the name for the function call. Each user could input the name of the server where its installed.
>
>lcPC = < get name from table or registry >
>ox = createobjectex(CLSID,lcPC)
>
>If you use the CLSID (which you will know since you built the thing), each user doesn't have to register it on their PC. All the information will be retrived from the server.
>
>Or am I missing something totally obvious?

Larry,

You are not missing anything obvious. What I am trying to do is eliminate any client intallation at all. What I have is a path to the server data on the client machine. What I need is the server machine name. I havn't been able to extrapolate that information from the path. I'll bet there is a way to return the UNC path from a mapped drive using an API routine. That way I could just supply CLSID and the machine name.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform