Nota
Pristup ovoj stranici zahteva autorizaciju. Možete pokušati da se prijavite ili promenite direktorijume.
Pristup ovoj stranici zahteva autorizaciju. Možete pokušati da promenite direktorijume.
Gets the system process identifier for the process hosting the program.
Syntax
Parameters
pdwHostPid
[out] Returns the system process identifier for the hosting process.
Return Value
If successful, returns S_OK; otherwise, returns an error code.
Example
The following example shows how to implement this method for a simple CProgram object that implements the IDebugProgramNode2 interface.
HRESULT CProgram::GetHostPid(AD_PROCESS_ID* pdwHostPid) {
// Check for valid argument.
if (pdwHostPid == NULL)
return E_INVALIDARG;
// Get the process identifier of the calling process.
pdwHostPid->ProcessIdType = AD_PROCESS_ID_SYSTEM;
pdwHostPid->ProcessId.dwProcessId = GetCurrentProcessId();
return S_OK;
}