Implementing IDebugProgramNode2::GetHostPid
When a program is published with the process debug manager (PDM) as a program that can be debugged, the PDM calls the program's IDebugProgramNode2::GetHostPid method to get the process identifier (PID) of the program being debugged. This PID uniquely identifies this process from all other processes known by the PDM.
To implement GetHostPid
Open the Program.cpp file, find CProgram::GetHostPid, and replace the //TODO: RETURN HOST PID as well as the following return statement with the following:
pHostProcessId->ProcessIdType = AD_PROCESS_ID_SYSTEM; pHostProcessId->ProcessId.dwProcessId = GetCurrentProcessId(); return S_OK;
Build the project to make sure there are no errors