Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Internet Explorer PrivacyGetZonePreferenceW()

Status
Not open for further replies.

CSGREEN

Programmer
Aug 26, 2004
1
CA
I've been having problems calling this method. The headers/libraries are OK so that's not the problem.

I need to find the privacy template that is in use for First and Third party privacy types in the Internet Zone.

The signature for this method is
DWORD PrivacyGetZonePreferenceW(
DWORD dwZone,
DWORD dwType,
LPDWORD pdwTemplate,
LPWSTR pszBuffer,
LPDWORD pdwBufferLength
);

These are the MSDN descriptions for parameters 3, 4, and 5:

pdwTemplate - [out] LPDWORD that returns a pointer to a DWORD containing which of the PrivacyTemplates is in use for this dwZone and dwType.

pszBuffer - [in, out] 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.

pdwBufferLength - [in, out] 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.

When I run my code I get a runtime failure: The variable 'lpdwTemplate' is being used without being defined.
This seems to imply that the function uses this parameter as input as well as output. Does anyone have a code sample of how to correctly call this function?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top