共用方式為


IDebugProperty3::GetCustomViewerList

Gets a list of custom viewers associated with this property.

HRESULT GetCustomViewerList(
   ULONG                celtSkip,
   ULONG                celtRequested,
   DEBUG_CUSTOM_VIEWER* rgViewers,
   ULONG*               pceltFetched
);
int GetCustomViewerList(
   uint                  celtSkip,
   uint                  celtRequested,
   DEBUG_CUSTOM_VIEWER[] rgViewers,
   out uint              pceltFetched
);

Parameters

  • celtSkip
    [in] The number of viewers to skip over.

  • celtRequested
    [in] The number of viewers to retrieve (also specifies the size of the rgViewers array).

  • rgViewers
    [in, out] Array of DEBUG_CUSTOM_VIEWER structures to be filled in.

  • pceltFetched
    [out] The actual number of viewers returned.

Return Value

If successful, returns S_OK; otherwise, returns an error code.

Remarks

To support type visualizers, this method forwards the call to the IEEVisualizerService::GetCustomViewerList method. If the expression evaluator also supports custom viewers for this property's type, this method can append the appropriate custom viewers to the list.

See Type Visualizer and Custom Viewer for details on the differences between type visualizers and custom viewers.

Example

The following example shows how to implement this method for a CProperty object that exposes the IDebugProperty3 interface.

STDMETHODIMP CProperty::GetCustomViewerList(ULONG celtSkip, ULONG celtRequested, DEBUG_CUSTOM_VIEWER* prgViewers, ULONG* pceltFetched)
{
    if (NULL == prgViewers)
    {
        return E_POINTER;
    }

    if (GetVisualizerService())
    {
        return m_pIEEVisualizerService->GetCustomViewerList(celtSkip, celtRequested, prgViewers, pceltFetched);
    }
    else
    {
        return E_NOTIMPL;
    }
}

See Also

Reference

IDebugProperty3

DEBUG_CUSTOM_VIEWER

IEEVisualizerService::GetCustomViewerList

Concepts

Type Visualizer and Custom Viewer