|
![]() |
![]() |
version 2003
PA_GetUserName (userName)
Parameter | Type | Description | |
userName | char * | ← | Name of the current user |
Description
The routine
PA_GetUserName
fills the string buffer pointed to by
userName
with the name of the current user.
This is like the
Current user
command.
Depending on default settings or on previous calls to
PA_UsePStrings
or
PA_UseCStrings
,
userName
will be a Pascal or an ANSI C string.
The max length of a user or group name is 31 chars (32 with the length byte or the 0 terminated)
Example
Get user info.
void GetSomeCurrentUserInfo(char *name, long *id)
{
if(name)
PA_GetUserName(name);
if(id)
PA_GetCurrentUserID();
}
See Also
Current user , PA_GetCurrentUserID .
Error Handling
always returns
eER_NoErr