PMDF Programmer's Reference Manual


Previous Contents Index


PMDFgetUserName

Determine the user name associated with the currently running process.

PASCAL

status = PMDF_get_user_name

(user_name, user_name_len)

argument information

Argument Data type Access Mechanism
user_name descriptor read/write reference
user_name_len unsigned word write reference

C

status = PMDFgetUserName

(user_name, user_name_len)

argument information


int PMDFgetUserName(char *user_name, int *user_name_len) 


Arguments

user_name

String to receive the current process's user name. Length must be sufficient to receive any user name supported by the operating system in use. Callers of PMDFgetUserName must include an extra byte for zero termination of the returned string.

user_name_len

Length in bytes of the returned user name. Callers using PMDFgetUserName must, on input, supply the maximum length in bytes of user_name.

Description

PMDFgetUserName can be called to determine the user name associated with the currently running process.

Return Values

PMDF__OK Normal, successful completion.
PMDF__FATERRLIB Call to LIB$SCOPY_R_DX failed owing to a fatal internal error in the OpenVMS Run Time Library. No user name returned.
PMDF__INSVIRMEM Insufficient virtual memory: call to LIB$GET_VM made by LIB$SCOPY_R_DX has failed. No user name returned.
PMDF__INVSTRDES Invalid string descriptor for user_name: descriptor has an invalid value in its DSC$B_CLASS field. No user name returned.
PMDF__STRTRU Supplied string was too long; value truncated to fit.


Previous Next Contents Index