 |
WNetGetUser ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
The WNetGetUser function retrieves the current default user name, or the user name used to establish a network connection. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
DWORD WNetGetUser(
LPCTSTR lpName, // device or resource name
LPTSTR lpUserName, // name buffer
LPDWORD lpnLength // buffer size
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER WNetGetUser IN mpr;
INTEGER lpName,;
STRING @ lpUserName,;
INTEGER @ lpnLength
|
 |
 |
 |
| Parameters: |
 |
lpName
[in] Pointer to a constant null-terminated string that specifies either the name of a local device or the remote name of a network resource.
lpUserName
[out] Pointer to a buffer that receives the null-terminated user name.
lpnLength
[in/out] Pointer to a variable that specifies the size, in characters, of the buffer pointed to by the lpUserName parameter. |
 |
 |
| Return value: |
 |
| If the function succeeds, the return value is NO_ERROR (0). |
 |
 |
| My comment: |
 |
Compare this function with the GetUserName.
SYS(0) -- the network machine information -- returns computer name and user name in one string. |
 |
 |
| Word Index links for the WNetGetUser : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2002-06-06 08:32:04 | | Modified: | 2002-06-07 08:45:19 | Visited in last 7 days: 32 |