共用方式為


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

  1. 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"); 
    
    }
    
  2. Build the project to make sure there are no errors.

See Also

Tasks

Registering the Program with the PDM