Share via


IKsPropertySet::QuerySupport Method

[The feature associated with this page, DirectSound, is a legacy feature. It has been superseded by WASAPI and Audio Graphs. Media Casting have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use Media Casting instead of DirectSound, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The QuerySupport method ascertains whether a property in a property set is supported on the port or device.

Syntax

HRESULT QuerySupport(
         REFGUID rguidPropSet,
         ULONG ulId,
         PULONG pulTypeSupport
)

Parameters

  • rguidPropSet
    Reference to (C++) or address of (C) a GUID representing the property set to be queried.
  • ulId
    Item within the property set to be accessed. Items are indexed from 0 and are always the same for a given property set.
  • pulTypeSupport
    Address of a variable that receives information about support for the property. This variable can receive one or both of the following flags. See Remarks.
    Value Description
    KSPROPERTY_SUPPORT_GET The property item may be retrieved.
    KSPROPERTY_SUPPORT_SET The property item may be set.

Return Value

Return values are determined by the designer of the property set.

If the method succeeds, the return value may be S_OK. (See Remarks.)

If it fails, the method may return one of the following error values:

Return code
E_NOTIMPL (See Remarks.)
E_POINTER

Remarks

Whether it is valid to support some properties within the set but not others depends on the definition of the property set. Consult the hardware manufacturer's specification for the property set of interest.

Some implementations may return S_OK when the property is not supported, and others may return E_NOTIMPL. To be sure that a property is supported, check both the return value of the method and the value returned in pulTypeSupport. If S_OK is returned but pulTypeSupport does not contain a valid flag, the property is not supported.

Requirements

Header: Declared in DSound.h.

Library: Use Dsound3d.dll.

See Also

IKsPropertySet