Microsoft DirectX 8.1 (C++) |
This topic applies to Windows XP Home Edition and Windows XP Professional only.
The get_Denials method retrieves the denials that block this toll, if any.
Syntax
HRESULT get_Denials(
ICADenials** ppDenials
);
Parameters
ppDenials
[out] Pointer to a variable that receives an ICADenials interface pointer.
Return Values
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
This method returns a pointer to the ICADenials collection interface. The caller can use this interface to enumerate the denials in the collection. The collection might be empty.
If the method succeeds, the ICADenials interface has an outstanding reference count. The caller must release the interface.
Toll Developers: The denials collection object cannot be created using CoCreateInstance. Instead, the collection is created automatically when the policy first adds the toll to its parent collection. To obtain the collection, call the ICAManager::get_DenialsFor method. The following example shows a typical implementation.
STDMETHOD(get_Denials)(MSTvCALib::ICADenials **ppDenials)
{
if (ppDenials == NULL)
return E_POINTER;
if(NULL == m_pManager) // Need to set the CA Manager first.
return E_INVALIDARG;
if (m_spCADenials == NULL)
{
// Get our own denials collection from the CA Manager and store it.
HRESULT hr;
CComQIPtr<IUnknown> pUnkThis(this);
hr = m_pManager->get_DenialsFor(pUnkThis, &m_spCADenials);
if(FAILED(hr))
return hr;
}
*ppDenials = m_spCADenials;
if(m_spCADenials)
(*ppDenials)->AddRef(); // AddRef on the way out.
return S_OK;
}
See Also