Share via


IDebugProperty3::GetCustomViewerCount

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Gets the number of custom viewers that might be available for this property.

Syntax

HRESULT GetCustomViewerCount(  
   ULONG* pcelt  
);  
int GetCustomViewerCount(  
   out uint pcelt  
);  

Parameters

pcelt
[out] The number of custom viewers available for this property.

Return Value

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

Remarks

In order to support type visualizers, this method forwards the call to the GetCustomViewerCount method. If the expression evaluator also supports custom viewers for this property's type, this method adds the number of custom viewers to the returned value.

For detailed information about the differences between type visualizers and custom viewers, see Type Visualizer and Custom Viewer.

Example

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

STDMETHODIMP CProperty::GetCustomViewerCount(ULONG* pcelt)  
{  
    if (pcelt == NULL)  
    {  
        return E_POINTER;  
    }  
  
    if (GetVisualizerService())  
    {  
        return m_pIEEVisualizerService->GetCustomViewerCount(pcelt);  
    }  
    else  
    {  
        return E_NOTIMPL;  
    }  
}  

See Also

IDebugProperty3
GetCustomViewerCount
Type Visualizer and Custom Viewer