IKsPropertySet::Set method

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The Set method sets a property identified by a property set GUID and a property ID.

Syntax

HRESULT Set(
  [in] REFGUID guidPropSet,
  [in] DWORD   dwPropID,
  [in] LPVOID  pInstanceData,
  [in] DWORD   cbInstanceData,
  [in] LPVOID  pPropData,
  [in] DWORD   cbPropData
);

Parameters

guidPropSet [in]

Property set GUID.

dwPropID [in]

Identifier of the property within the property set.

pInstanceData [in]

Pointer to a buffer that contains instance data for the property.

cbInstanceData [in]

Size of the pInstanceData buffer, in bytes.

pPropData [in]

Pointer to a buffer that contains the value of the property.

cbPropData [in]

Sise of the pPropData buffer, in bytes.

Return value

Returns an HRESULT value. Possible values include the following.

Return code Description
S_OK
Success.
E_PROP_SET_UNSUPPORTED
The property set is not supported.
E_PROP_ID_UNSUPPORTED
The property ID is not supported for the specified property set.

 

Remarks

Note

Another interface by this name exists in the dsound.h header file. The two interfaces are not compatible. The IKsControl interface, documented in the DirectShow DDK, is now the recommended interface for passing property sets between WDM drivers and user mode components.

 

You must include Ks.h before Ksproxy.h.

Requirements

Requirement Value
Minimum supported client
Windows 2000 Professional [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]
Header
Ksproxy.h
Library
Strmiids.lib

See also

Error and Success Codes

IKsPropertySet Interface

Property Sets