osiProcess.h

Operating System Independent Interface to Process Environment.

Enums

enum osiGetUserNameReturn

Return code for osiGetUserName()

Values:

enumerator osiGetUserNameFail

Failed

enumerator osiGetUserNameSuccess

Succeeded

enum osiSpawnDetachedProcessReturn

Return code for osiSpawnDetachedProcess()

Values:

enumerator osiSpawnDetachedProcessFail

Failed

enumerator osiSpawnDetachedProcessSuccess

Succeeded

enumerator osiSpawnDetachedProcessNoSupport

Not supported by OS

Functions

osiGetUserNameReturn osiGetUserName(char *pBuf, unsigned bufSize)

get user name

Get the name of the user associated with the current process and copy the name into the provided buffer

Parameters:
  • pBuf – buffer where user name is copied into

  • bufSize – size of input buffer.

Returns:

return failed if unable to get user name or user name is too large to fit in buffer. Otherwise return success

osiSpawnDetachedProcessReturn osiSpawnDetachedProcess(const char *pProcessName, const char *pBaseExecutableName)

Spawn detached process.

Spawn detached process with named executable.

Parameters:
  • pProcessName – process name to be displayed. Not used in all OSs

  • pBaseExecutableName – path to executable

Returns:

return code indicating success or failure