IDebugProgramProvider2 Home
This page is specific to:.NET Framework Version:2.03.54.0
Visual Studio SDK
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
Notes for Implementers

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.

Notes for Callers

Call COM's CoCreateInstance function with the CLSID of the program provider that is obtained from the registry. See the Example.

Methods in Vtable order

Method

Description

IDebugProgramProvider2::GetProviderProcessData

Obtains information about programs running, filtered in a variety of ways.

IDebugProgramProvider2::GetProviderProgramNode

Gets a program node, given a specific process ID.

IDebugProgramProvider2::WatchForProviderEvents

Establishes a callback to watch for provider events associated with specific kinds of processes.

IDebugProgramProvider2::SetLocale

Establishes a locale for any language-specific resources needed by the DE.

Remarks

Normally, a process uses this interface to find out about the programs running in that process.

Requirements

Header: msdbg.h

Namespace: Microsoft.VisualStudio.Debugger.Interop

Assembly: Microsoft.VisualStudio.Debugger.Interop.dll

Example

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);
}

See Also

Concepts

Reference

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View