Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get computer name from system
Message
From
09/05/2001 07:55:45
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
09/05/2001 07:51:49
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00505117
Message ID:
00505186
Views:
22
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform