Udostępnij za pośrednictwem


IInternetSecurityManager::QueryCustomPolicy method

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

Syntax

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

Parameters

  • pwszUrl [in]
    A pointer to a string value that specifies the URL.

  • guidKey [in]
    A globally unique identifier associated with the custom policy.

  • ppPolicy [out]
    A pointer to the buffer to store 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 specifies 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.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

DLL

Urlmon.dll

See also

IInternetSecurityManager

QueryCustomPolicyEx2