IDebugProgramProvider2
This registered interface allows the session debug manager (SDM) to obtain information about programs that have been "published" through the IDebugProgramPublisher2 interface.
IDebugProgramProvider2 : IUnknown
The debug engine (DE) implements this interface to provide information about programs being debugged. This interface is registered in the DE section of the registry using the metric metricProgramProvider, as described in SDK Helpers for Debugging.
|
Method |
Description |
|---|---|
|
Obtains information about programs running, filtered in a variety of ways. |
|
|
Gets a program node, given a specific process ID. |
|
|
Establishes a callback to watch for provider events associated with specific kinds of processes. |
|
|
Establishes a locale for any language-specific resources needed by the DE. |
IDebugProgramProvider2 *GetProgramProvider(GUID *pDebugEngineGuid)
{
// This is typically defined globally. For this example, it is
// defined here.
static const WCHAR strRegistrationRoot[] = L"Software\\Microsoft\\VisualStudio\\8.0Exp";
IDebugProgramProvider2 *pProvider = NULL;
if (pDebugEngineGuid != NULL) {
CLSID clsidProvider = { 0 };
::GetMetric(NULL,
metrictypeEngine,
*pDebugEngineGuid,
metricProgramProvider,
&clsidProvider,
strRegistrationRoot);
if (!IsEqualGUID(clsidProvider,GUID_NULL)) {
CComPtr<IDebugProgramProvider2> spProgramProvider;
spProgramProvider.CoCreateInstance(clsidProvider);
if (spProgramProvider != NULL) {
pProvider = spProgramProvider.Detach();
}
}
}
return(pProvider);
}