Determine the user name associated with the currently running process.
argument informationstatus = PMDF_get_user_name
(user_name, user_name_len)
| Argument | Data type | Access | Mechanism |
|---|---|---|---|
| user_name | descriptor | read/write | reference |
| user_name_len | unsigned word | write | reference |
argument informationstatus = PMDFgetUserName
(user_name, user_name_len)
int PMDFgetUserName (user_name, user_name_len)
char *user_name;
int *user_name_len;
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.
PMDF_get_user_name may 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. |