SKETCH OF HOW RESEARCH MIGHT CONTINUE AND RESULTS BE PRESENTED

SHWindowsPolicyGetValue

Declaration

HRESULT
SHWindowsPolicyGetValue (
    REFGUID rpolid,
    PVOID pvData,
    DWORD *pcbData);

Parameters

The rpolid argument provides by reference a GUID for the policy whose value is wanted. The supported policy identifiers are listed separately, since there are very many.

The pvData argument provides the address of a buffer that is to receive data that is the policy’s value. This argument can be NULL to mean that there is no buffer and that the data is not wanted.

The pcbData argument provides the address of a variable that plays different roles on input and output. On input, the variable provides the size of the buffer, in bytes. This size is ignored if pvData is NULL, because there is then no buffer. On output, the variable receives the size of the data, in bytes. This argument can be NULL to mean that the size of the buffer is zero (if a buffer is even given) and that the size of the data is not wanted.

Return Value

The function returns zero for success, else an error code.

Of particular interest are the cases in which the value is accessible but has more data than can fit in the given buffer, including because there is no buffer:

Behaviour

IN PROGRESS

Availability

The SHWindowsPolicyGetValue function is exported from SHLWAPI as ordinal 560 in version 6.0 from Windows XP SP2 and Windows Server 2003 SP1, and higher.