[#BloombergLP-bdls-ProcessUtil-getProcessName]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdls.adoc[bdls]::xref:BloombergLP/bdls/ProcessUtil.adoc[ProcessUtil]::getProcessName
:relfileprefix: ../../../
:mrdocs:

Load the system&hyphen;specific name of the currently running process&period;

== Synopsis

Declared in `&lt;bdls&lowbar;processutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
getProcessName(xref:bsl/string.adoc[bsl::string]* result);
----

== Description

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

== Return Value

0 on success, and a non&hyphen;zero value otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *result*
| receives the process name
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
