prg_env_user_name_get()

Abstract

Returns the current user's account name.

Syntax

prg_env_user_name_get (user_name_str)
Argument Type Description
user_name_str char * A character array that will receive the user's account name.

Return Type

PrgT_Compcode

PrgC_Compcode_Failure if the user's account name could not be obtained from the operating system; PrgC_Compcode_Success otherwise.

prg_env.h

Example

char user_name_str [128];
...
prg_env_user_name_get (user_name_str);
printf ("The user's account name is %s\n", user_name_str);

Details

The account name is obtained from the operating system (usually by fetching the value of the USER environment variable or equivalent). Because the details vary from system to system, this function is provided as a convenience.

Purpose

Provides a mechanism to obtain the account name of the current user.

Errors

  • None

Reference

  • None

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com