Share via


IDebugDocumentPosition2::GetFileName

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 file name of the source file that contains the document position.

Syntax

HRESULT GetFileName(   
   BSTR* pbstrFileName  
);  
int GetFileName(   
   out string pbstrFileName  
);  

Parameters

pbstrFileName
[out] Returns the file name of the source file.

Return Value

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

Remarks

A source file may not always have a file name (the source file may not exist on disk, for example).

See Also

IDebugDocumentPosition2