Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to Get Server Name
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00456426
Message ID:
00456469
Vues:
26
I am not sure I understand. You need the name of the server, in your example JUPITER? And the client calling the DCOM object is on the same machine? Or are you talking about the ProgID, rather than hard-coding the ClassID?

>That gives me my computers name. I need the name of the server computer.
>
>Thanks anyway.
>
>>>I use the following line of code to create a DCOM object.
>>>
>>>CREATEOBJECTEX( "{5A82A0A2-D1DE-11D4-BA25-400001020301}", "\\JUPITER")
>>>
>>>The calling program and the DCOM Object are on the same machine.
>>>Does anyone know of a VFP or API function to get the Server Name so it does not have be hard coded?
>>>
>>>Thanks.
>>>
>>>Dennis
>>
>>This may be the cooler way to do it < g >:
>>
>>oNetwork = CREATEOBJECT('Wscript.Network')
>>lcName = oNetwork.ComputerName
Chris McCandless
Red Sky Software
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform