Partager via


ITransformPropertiesConfig::CreateProperty method

The CreateProperty method creates a new property and adds it to the current property collection.

Syntax

HRESULT CreateProperty(
  [in]  LPCTSTR            szPropertyName,
  [in]  PROPVARIANT        varValue,
  [out] ITransformProperty **ppNewProperty
);

Parameters

szPropertyName [in]

A pointer to a NULL-terminated string that specifies the name for the new property.

varValue [in]

A PROPVARIANT that specifies the value of the new property.

ppNewProperty [out]

Address of a pointer to the newly created property.

Return value

The method returns an HRESULT of S_OK for success, or a standard COM error code for failure.

Remarks

An alternate way of creating a new property is to call ITransformPropertiesConfig::SetPropertyValue; however, if the property with the specified name already exists, that method will overwrite the existing property.

Requirements

Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Header
GPUPipelineTime.h
Library
GPUPipelineVC8.lib (Visual Studio 2005);
GPUPipelineVC7.lib (Visual Studio .NET)

See also

ITransformPropertiesConfig Interface