Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Gets the name of the program.
Syntax
Parameters
pbstrProgramName
[out] Returns the name of the program.
Return Value
If successful, returns S_OK
; otherwise, returns an error code.
Remarks
The name of a program is not the same thing as the path to the program, although the name of the program may be part of such a path.
Example
The following example shows how to implement this method for a simple CProgram
object that implements the IDebugProgramNode2 interface. The MakeBstr
function allocates a copy of the specified string as a BSTR.
HRESULT CProgram::GetProgramName(BSTR* pbstrProgramName) {
if (!pbstrProgramName)
return E_INVALIDARG;
// Assign the member program name to the passed program name.
*pbstrProgramName = MakeBstr(m_pszProgramName);
return NOERROR;
}