Load the system‐specific name of the currently running process.

Synopsis

Declared in <bdls_processutil.h>

static
int
getProcessName(bsl::string* result);

Description

Load the system specific process name for the currently running process into the specified *result. Return 0 on success, and a non‐zero value otherwise. The language in which *result is provided is unspecified; *result will be encoded as UTF‐8, but might not be normalized. On failure, *result will be unmodified. Note that the primary purpose of this method is to provide an identifier for the current process, and *result may not be a valid path to the executable; to access the actual task file for the process use getPathToExecutable below.

Return Value

0 on success, and a non‐zero value otherwise

Parameters

Name

Description

result

receives the process name

Created with MrDocs