Publishing the Program Node
Publishing the program node allows the session debug manager to get information about the program so as to create a program object. The IDebugProgramPublisher2 interface publishes program nodes as well as programs (TextInterpreter needs only to publish a program node).
To add the program node
Open the Program.cpp file, find the CProgram::Start method, and add the following bold lines:
ATLTRACE("Failed to create the program publisher: 0x%x.", hr); return; } hr = m_srpProgramPublisher->PublishProgramNode( static_cast<IDebugProgramNode2*>(this)); if ( FAILED(hr) ) { ATLTRACE("Failed to publish the program node: 0x%x.", hr); m_srpProgramPublisher.Release(); return; } ATLTRACE("Added program node.\n"); }
Build the project to make sure there are no errors.