IInternetSecurityManagerEx2::QueryCustomPolicyEx2 method
Gets the custom policy associated with the URL and specified key in the given context.
Syntax
HRESULT QueryCustomPolicyEx2(
[in] IUri *pUri,
[in] REFGUID guidKey,
[out] BYTE **ppPolicy,
[out] DWORD *pcbPolicy,
[in] BYTE *pContext,
[in] DWORD cbContext,
[in] DWORD dwReserved
);
Parameters
pUri [in]
A pointer to an IUri interface that specifies the URL.guidKey [in]
A GUID associated with the custom policy.ppPolicy [out]
A pointer to a buffer that stores the policy information.pcbPolicy [out]
A pointer to a DWORD that specifies the size of the buffer returned in ppPolicy.pContext [in]
A pointer to a buffer that specifies the context information.cbContext [in]
A DWORD 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.
Remarks
IInternetSecurityManagerEx2::QueryCustomPolicyEx2 was introduced in Windows Internet Explorer 7.
IInternetSecurityManagerEx2::QueryCustomPolicyEx2 is identical to QueryCustomPolicy except that it takes its URL from an IUri object.
The default action is to call GetZoneCustomPolicy with URLZONEREG_DEFAULT.
The caller is responsible for freeing the memory buffer returned in ppPolicy with CoTaskMemFree.
Requirements
Minimum supported client |
Windows XP with SP2 |
Minimum supported server |
Windows Server 2003 with SP1 |
Product |
Internet Explorer 7 |
Header |
Urlmon.h |
IDL |
Urlmon.idl |
DLL |
Urlmon.dll |