Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where does SYS(0) get its information
Message
De
20/07/2001 05:11:52
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
20/07/2001 04:51:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00533019
Message ID:
00533023
Vues:
11
>Hi,
>
>I've found a problem with the SYS(0) function. I work on an in-house database system, which most users use in a network setting, with a few working on stand-alone computers.
>
>I've been using SYS(0) to get the user and computer names which has been working fine until now. One of the stand-alone users had a problem with copying files from their computer to another and had to restart their computer. After that, we found that the SYS(0) function is returning a blank for the username.
>
>Does anyone know where SYS(0) looks? Alternatively, is there another way of getting this information?
>
>Thanks,
>
>Stewart

Stewart,
This is documented. If it's standalone then username would be empty.
I don't know the exact one but it's mapping to WNetGet* API.
You could workaround it by checking return value and poking HDD serial or say user name got from a login dialog as appropriate.
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
Répondre
Fil
Voir

Click here to load this message in the networking platform