Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get user name from network
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00275384
Message ID:
00275787
Views:
23
>I used to do way more programming in C/C++, and for a real eye opener one time, we ran lint (a C utility) on our code. It found over 300 questionable pointer references in this one large program we had. The program never crashed, but after examining each of these places in the code, we could see where there was a potential for problem. I wish there was something like that utility for VFP! Like I said, you've just been lucky! (Tick, tick, tick...) :)

Okay, here's my new one-line version of obtaining user name:

ALLTRIM(SUBSTR(SYS(0),ATC('#',SYS(0))+1,LEN(SYS(0))))

I *think* this will always work in a network environment, though you might want to check for a '0' result (I think it is) to ensure there's been a login.
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform