IInternetHostSecurityManager::QueryCustomPolicy method

Gets the custom policy associated with the specified key in the given context.


HRESULT QueryCustomPolicy(
  [in]  REFGUID guidKey,
  [out] BYTE    **ppPolicy,
  [out] DWORD   *pcbPolicy,
  [in]  BYTE    *pContext,
  [in]  DWORD   cbContext,
  [in]  DWORD   dwReserved


guidKey [in]

A globally unique identifier associated with the custom policy.

ppPolicy [out]

A pointer to the buffer that stores the policy information.

pcbPolicy [out]

A pointer to an unsigned long integer value that specifies the policy buffer size.

pContext [in]

A pointer to a buffer that contains the context information.

cbContext [in]

An unsigned long integer value that specifies the size of the context buffer.

dwReserved [in]

Reserved. Must be set to 0.

Return value

Returns S_OK if successful, or E_OUTOFMEMORY if there is not enough memory to complete the operation.

This method can also return the HRESULT derived from the Win32 error code ERROR_NOT_FOUND to indicate that the action cannot be read from the registry.


Specify GUID_CUSTOM_CONFIRMOBJECTSAFETY for guidKey to confirm that an object created in this document is safe for scripting. Specify the class identifier (CLSID) and pointer to the object in the pContext parameter using a CONFIRMSAFETY structure.


Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server



See also