Function gpa::system::GetProcessName

Function Documentation

size_t gpa::system::GetProcessName(TCHAR *processName, uint32_t numChars, bool includeExtension = false)

Get the name of the current process.

Note

If the provided processName buffer is not large enough to receive the name of the current process, the process name will be truncated; the last character in the buffer is guaranteed to be null.

Parameters
  • processName -- A buffer prepared to receive the name of the calling process, as displayed in TaskManager on Windows or via "ps" or "top" on POSIX systems. This name is a null-terminated string.

  • numChars -- Number of bytes available for writing in the processName buffer.

  • includeExtension -- Whether or not to include extension. This only affects Windows.

Returns

Number of bytes written to the process name buffer.