Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Windows Login
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00271179
Message ID:
00271210
Vues:
33
>>>>Is there a way in VFP to get the Windows Login name?
>>>
>>>SYS(0)
>>
>>We had a problem with that, but I can't recall what it was. We now use:
>>
>>local cBuffer
>>cBuffer = SPACE(30)
>>DECLARE INTEGER GetUserName IN WIN32api ;
>> STRING @,INTEGER @
>>
>>GetUserName(@cBuffer,30)
>>cBuffer = chrtran(cBuffer,chr(0),'')
>>
>>So I'll post this as a backup, anyway.
>
>I have seen people post messages like your before, but nobody remembered what the problem was. I have tested SYS(0) successfully on standalone machines, Win95, Win98, WinNT machines, Novell networks and NT networks and never seen a problem. There must be one though, because you are not the first person to mention it...

Hi Erik,

If I recall correctly, SYS(0) was fixed in one of the VFP 3.0 releases or patches. I seem to remember downloading something from the MS site that fixed it. In FPW 2.6 it still doesn't work. Works fine in 6.0 (and 5.0 also).
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform