ResUtilAddUnknownProperties function (resapi.h)

Retrieves a set of unknown properties from the cluster database and appends them to the end of a property list.

Syntax

DWORD ResUtilAddUnknownProperties(
  [in]      HKEY                         hkeyClusterKey,
  [in]      const PRESUTIL_PROPERTY_ITEM pPropertyTable,
  [in, out] PVOID                        pOutPropertyList,
  [in]      DWORD                        pcbOutPropertyListSize,
  [in, out] LPDWORD                      pcbBytesReturned,
  [in, out] LPDWORD                      pcbRequired
);

Parameters

[in] hkeyClusterKey

Pointer to the cluster database key that identifies the location for the properties to read.

[in] pPropertyTable

Pointer to a property table describing the common and private properties of an object. Any properties found in the cluster database that are not in this property table are added to the property list.

[in, out] pOutPropertyList

Pointer to a buffer in which to receive the returned properties. On input, the buffer can contain an existing property list, or it can be empty. On output, the retrieved properties will be appended to the end of the existing list, or, if the buffer is empty, will return as a new property list.

[in] pcbOutPropertyListSize

Total byte size of the buffer pointed to by pOutPropertyList. The size of the buffer must be large enough to contain the existing property list and the property list to be returned.

[in, out] pcbBytesReturned

On input, pointer to the byte size of the property list contained by the pOutPropertyList buffer. On output, pointer to the total number of bytes in the property list pointed to by pOutPropertyList.

[in, out] pcbRequired

On output, points to the total number of bytes required to hold the returned property list. If the pOutPropertyList buffer was too small, it can be reallocated to the required size.

Return value

If the operation succeeds, the function returns ERROR_SUCCESS.

If the operation fails, the function returns a system error code. The following is a possible error code.

Return code Description
ERROR_NOT_ENOUGH_MEMORY
There was an error allocating memory.

Remarks

The relationships between the input and output parameters of ResUtilAddUnknownProperties are illustrated in the following diagram:

Diagram showing input and output parameters listed separately in two buffers. Two unknown properties have been added to the output parameter list.

The ResUtilAddUnknownProperties utility function enumerates the properties stored in the cluster database (under hkeyClusterKey) and looks for corresponding properties in the property table (pPropertyTable). Each property that is listed in the cluster database but not listed in the property table is added to the property list (pOutPropertyList).

Requirements

Requirement Value
Minimum supported client None supported
Minimum supported server Windows Server 2008 Enterprise, Windows Server 2008 Datacenter
Target Platform Windows
Header resapi.h
Library ResUtils.lib
DLL ResUtils.dll

See also

RESUTIL_PROPERTY_ITEM

ResUtilSetUnknownProperties