The information in this article applies to:
SUMMARYWindows NT and Windows 95 may require that users log on to a computer or network. On occasion, you may want to use the login user id for your application. By using the GetUserName API call, you can discover the name of the user who is currently logged on to the system. This article shows by example how to use and call the Win32 GetUserName API. MORE INFORMATION
Having the user id of the currently logged in user can be helpful in
multiuser programming for situations such as updating a table field with
the user id of a user who has a record locked.
Sample Code
General InformationFor an alternative to this method that will work on any of the platforms, including Windows 3.1 and Windows for Workgroups, please see the following article in the Microsoft Knowledge Base:Q99921 HOWTO: Obtain Network User IDs from Within FoxPro REFERENCES
For additional information on this API function, please refer to the online
Win32API help file under the "GetUserName" topic. Note that this help file
is available only on the compact disc version of Visual FoxPro. It is not
shipped with the floppy disk version.
Additional query words:
Keywords : kbVFp300 kbVFp500 kbVFp600 |
Last Reviewed: July 27, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |