GetUserName Function

Applies To  

Retrieves the name of the user for whom the request is being processed.

Syntax
GetUserName(
    IUSERINFO_HANDLE i_hIUserInfo , 
    unsigned short* io_userNameSize,
    Char* o_userName)
Parameters

i_hIUserInfo [In]

The handle to the interface. See hIUserInfo Variable.

io_userNameSize [In, Out]

The size of your buffer.

o_userName [Out]

The name of the user.

Returns

Each function returns a RET_VALUE that is an error code of type Long. The return value is greater than zero if the call was successful, and zero or less if not. Use RET_OK(x) and RET_ERROR(x) to check for failure.

If the function call fails, check the value of the buffer size parameter. After a successful function call, this parameter contains the size of the buffer that you passed in. However, if the buffer size is too small, then the function returns PROCESSEXTERR_BUFFERSIZETOOSMALL, and the buffer size that is needed is specified in the parameter.

Remarks

During a view request, GetUsername retrieves the name of the user who has logged on to the system and is viewing the report. During a schedule request, this function retrieves the name of the user who owns the instance that is being scheduled, and not the name of the submitter or the report owner.



Crystal Decisions, Inc.
http://www.crystaldecisions.com
Support services:
http://support.crystaldecisions.com