CItemIDFactory::CreateItemID method (shidfact.h)

Creates an ItemID from the supplied data.

Syntax

HRESULT CreateItemID(
  [in, optional]      const T        *pinner,
  [in, out, optional] IPropertyStore *pps,
  [out]               PITEMID_CHILD  *ppidl
);

Parameters

[in, optional] pinner

A pointer to the client structure that should be copied.

[in, out, optional] pps

A pointer to an IPropertyStore that will be seriallized into the ItemID.

[out] ppidl

When this method returns, contains a pointer to the ItemID containing the client data and IPropertyStore data.

Return value

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

Remarks

The size of the user supplied data must equal sizeof(T). Do not use structs with variably allocated array/string members. The struct must also follow standard SHITEMID for persistence and portability.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header shidfact.h

See also

CItemIDFactory

IPropertyStore

SHITEMID