Partager via


ITransformPropertiesConfig::AddProperty method

The AddProperty method adds a previously created property to the current collection.

Syntax

HRESULT AddProperty(
  [in] ITransformProperty *pNewProperty
);

Parameters

pNewProperty [in]

Pointer to an existing property to add to the current collection. You can get this value by calling ITransformProperties::get_PropertyByIndex, ITransformProperties::get_PropertyByName, ITransformProperty::Clone, ITransformPropertiesConfig::CreateProperty, or CreateTransformProperty.

Return value

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

Remarks

If a property already exists with the same name as the submitted property, this method will add a property with a duplicate name and the new value. The caller can still get duplicate properties by iterating through child properties using ITransformProperties::get_PropertyByIndex; however, when calling ITransformProperties::get_PropertyByName, which duplicate property will be retrieved is undefined.

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