IPersistSerializedPropStorage2::GetPropertyStorageBuffer method (propsys.h)

Gets the serialized property storage buffer from the property store instance.

Syntax

HRESULT GetPropertyStorageBuffer(
  [out] SERIALIZEDPROPSTORAGE *psps,
  [in]  DWORD                 cb,
  [out] DWORD                 *pcbWritten
);

Parameters

[out] psps

Type: SERIALIZEDPROPSTORAGE*

When this method returns successfully, contains the contents of the property storage buffer.

[in] cb

Type: DWORD

The initial size, in bytes, of the buffer pointed to by psps

[out] pcbWritten

Type: DWORD*

The count of bytes contained in the serialized property storage buffer pointed to by psps.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

This methods returns an error if cb is smaller than the total size of the serialized data.

The SERIALIZEDPROPSTORAGE type is defined in Propsys.h as an incomplete type. It should be treated as an array of BYTE values; the format of the returned data is not specified. The contents of the SERIALIZEDPROPSTORAGE structure are suitable for persisting to disk or other storage and can be used to initialize another property store through IPersistSerializedPropStorage::SetPropertyStorage.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header propsys.h