Share via


IDebugDocument2::GetName

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. 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 the document in one of several forms.

Syntax

HRESULT GetName( 
   GETNAME_TYPE gnType,
   BSTR*        pbstrFileName
);
int GetName( 
   enum_GETNAME_TYPE gnType,
   out string        pbstrFileName
);

Parameters

gnType
[in] A value from the GETNAME_TYPE enumeration that determines the type of name to return.

pbstrFileName
[out] Returns a string containing the document name.

Return Value

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

Remarks

This method can, for example, return the name of the document as a title or as a file name or even part of a file name.

See also