Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get computer name from system
Message
De
09/05/2001 07:55:45
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
09/05/2001 07:51:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00505117
Message ID:
00505186
Vues:
23
>>Jason,
>>
>>>I am wondering how to get the computer name from the system. This will need to work on windows 95, 98, Nt, 2000 whether connected to a network or not.
>>>
>>>I am planning on using this for a simple software copy protection. Is there any other pieces of system information that would also prove useful instead of or in addition to the computer name.
>>>
>>>Jason
>>
>>SYS(0) should do the trick for basic information.
>>
>Have you all tried SYS(0) on a machine that is not networked? If I'm reading the Help correctly it may not return the desired info but I haven't tried it. Since he indicated the function had to work on a networked or non-networked machine I suppose an API call such as GetComputerName() may be needed.
>
>Bill

Bill,
AFAIK sys(0) maps to GetComputerName() API. In a nonnetworked it returns '#' as I remember.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform