Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Vfp Getenv() returns blanks
Message
 
 
To
17/07/1997 09:41:26
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00040395
Message ID:
00040500
Views:
68
>We are in the process of converting from FPW2.6 to VFP3 on a Novell Network.
>
>In FPW26, we always used Getenv('FullName') to retrieve the user "Full Name" from the network.
>This always worked fine. However, in VFP3 the same Getenv('FullName') function will work on
>a few machines but in most cases the function returns a blank. The workstation PCs are
>running either Win95 or Win31. The Getenv() fails on both types of workstaions.
>
>Has anybody else noticed this behaviour? How did you work around it?
>
>We bought a copy of Gplib and this got us around the problem by using a gplib function to
>return the user's full name.
>
>Jerryt

See the FAQ in the Knowledge base under Win32 and Other API for an example of using Win32 to get the user's login name. Work's every time and it's "free" with Windows (vs GPLib or NetLib, although they are very useful products). This also can not be defeated by a clever user changing his/her environment variable. When security (minimal in VFP at best) or user validation is needed, I set up a cross-reference table with user's login name, full name, and a "hashed" field based on some formula of their login name and full name [see SYS(2007)]. I check the 2 names in the table, hash them according to my formula, and compare the result to that in the pre-set "hashed" field. To verify the names in the table have not been tampered with.

Of course I am not paranoid. Who's there?!?!? ;^)

HTH.
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform