共用方式為


IKsPropertySet::Get 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 Get method retrieves data for an item in a property set.

Syntax

HRESULT Get(
         REFGUID rguidPropSet,
         ULONG ulId,
         LPVOID pInstanceData,
         ULONG ulInstanceLength,
         LPVOID pPropertyData,
         ULONG ulDataLength,
         PULONG pulBytesReturned
)

Parameters

  • rguidPropSet
    Reference to (C++) or address of (C) a GUID representing the property set to be accessed.
  • ulId
    Item within the property set to be accessed. Items are indexed from 0 and are always the same for a given property set GUID.
  • pInstanceData
    Instance data for the get call.
  • ulInstanceLength
    Number of bytes pointed to by pInstanceData.
  • pPropertyData
    Data to set for this item.
  • ulDataLength
    Number of bytes pointed to by pPropertyData
  • pulBytesReturned
    Address of a variable that receives the number of bytes written into pPropertyData.

Return Value

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

If the method succeeds, the return value may be S_OK.

If it fails, the method may return one E_POINTER.

Remarks

The format of the data in both pInstanceData and pPropertyData is item-specific.

Requirements

Header: Declared in DSound.h.

Library: Use Dsound3d.dll.

See Also

IKsPropertySet