Partager via


IDebugThread2::GetName

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Gets the name of a thread.

Syntax

HRESULT GetName (   
   BSTR* pbstrName  
);  
int GetName (   
   out string pbstrName  
);  

Parameters

pbstrName
[out] Returns the name of the thread.

Return Value

If successful, returns S_OK; otherwise, returns an error code.

Remarks

The retrieved name is always a name that can be displayed and this name describes the thread. The thread name might be derived from a run-time architecture that supports named threads, or it might be a name derived from the debug engine. Alternatively, the name of the thread can be set by a call to the SetThreadName method.

See Also

IDebugThread2
SetThreadName