Share via


IDirectSoundCaptureBuffer8::GetObjectInPath 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 GetObjectInPath method retrieves an interface to an effect object associated with the buffer.

Syntax

HRESULT GetObjectInPath(
         REFGUID rguidObject ,
         DWORD dwIndex ,
         REFGUID rguidInterface ,
         LPVOID * ppObject
)

Parameters

  • rguidObject
    Value of type REFGUID that specifies the unique class identifier of the object being searched for, such as GUID_DSCFX_CLASS_AEC.
  • dwIndex
    Index of the object within objects of that class in the path. See Remarks.
  • rguidInterface
    Unique identifier of the desired interface, such as IID_IDirectSoundCaptureFXAec8.
  • ppObject
    Address of a variable that receives the desired interface pointer.

Return Value

If the method succeeds, the return value is DS_OK. If the method fails, the return value may be one of the following error values:

Return code
DSERR_CONTROLUNAVAIL
DSERR_INVALIDPARAM
DSERR_OBJECTNOTFOUND

Remarks

The value in dwIndex is the index of the object within the array of effects in the DSCBUFFERDESC structure passed to DirectSoundFullDuplexCreate8 or IDirectSoundCapture8::CreateCaptureBuffer.

Requirements

Header: Declared in DSound.h.

Library: Use Dsound3d.dll.

See Also

IDirectSoundCaptureBuffer8