PrivacyGetZonePreferenceW function (winineti.h)

Retrieves the privacy settings for a given URLZONE and PrivacyType.

Syntax

DWORD PrivacyGetZonePreferenceW(
  [in]                DWORD   dwZone,
  [in]                DWORD   dwType,
  [out, optional]     LPDWORD pdwTemplate,
  [out, optional]     LPWSTR  pszBuffer,
  [in, out, optional] LPDWORD pdwBufferLength
);

Parameters

[in] dwZone

A value of type DWORD that specifies the URLZONE for which privacy settings are being retrieved.

[in] dwType

A value of type DWORD that specifies the PrivacyType for which privacy settings are being retrieved.

[out, optional] pdwTemplate

An LPDWORD that returns a pointer to a DWORD containing which of the PrivacyTemplates is in use for this dwZone and dwType.

[out, optional] pszBuffer

An LPWSTR that points to a buffer containing a LPCWSTR representing a string version of the pdwTemplate or a customized string if the pdwTemplate is set to PRIVACY_TEMPLATE_CUSTOM. See PrivacySetZonePreferenceW for a description of a customized privacy preferences string.

[in, out, optional] pdwBufferLength

An LPDWORD that contains the buffer length in characters. If the buffer length is not sufficient, PrivacyGetZonePreferenceW returns with this parameter set to the number of characters required and with a return value of ERROR_MORE_DATA.

Return value

Returns zero if successful. Otherwise, one of the Error Messages defined in winerr.h is returned.

Remarks

These privacy settings for the Internet zone are found on the Privacy tab of the Internet Options dialog box.

Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.

Note  WinINet does not support server implementations. In addition, it should not be used from a service. For server implementations or services use Microsoft Windows HTTP Services (WinHTTP).
 

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header winineti.h (include Wininet.h)
Library Wininet.lib
DLL Wininet.dll

See also

InternetClearAllPerSiteCookieDecisions

InternetEnumPerSiteCookieDecision

InternetGetPerSiteCookieDecision

InternetSetPerSiteCookieDecisions

PrivacySetZonePreferenceW