Microsoft DirectX 8.1 (Visual Basic) |
The GetObjectInPath method retrieves an object in the audiopath.
object.GetObjectInPath( _
lPChannel As Long, _
lStage As CONST_DMUSIC_PATH, _
lBuffer As Long,
guidObject As String, _
lIndex As Long, _
iidInterface As String _
) As Unknown
Parts
object
Resolves to a DirectMusicAudioPath8 object.
lPChannel
lStage
Stage in the path. One of the constants from the CONST_DMUSIC_PATH enumeration. See Remarks.
lBuffer
If lStage is DMUS_PATH_BUFFER_DMO or DMUS_PATH_MIXIN_BUFFER_DMO, specifies the index of the buffer in which that DMO resides. If lStage is DMUS_PATH_BUFFER or DMUS_PATH_MIXIN_BUFFER, specifies the index of the buffer. Otherwise must be 0.
guidObject
Class identifier of the object, such as CLSID_DirectMusicPerformance, or GUID_ALL_OBJECTS to search for an object of any class. This parameter is ignored if only a single class of object can exist at the stage specified by lStage, and can be set to GUID_NULL.
lIndex
Index of the object within a list of matching objects. Set to 0 to find the first matching object. If lStage is DMUS_PATH_BUFFER or DMUS_PATH_MIXIN_BUFFER, this parameter is ignored, and the buffer index is specified by lBuffer.
iidInterface
Identifier of the desired class. This can be a GUID in string form, or one of the identifiers in the AUDIOSTRINGCONSTANTS module, such as IID_DirectSoundPrimaryBuffer.
Return Values
Returns an object of the class specified in iidInterface.
Error Codes
If the method fails, an error is raised. Possible values of Err.Number include the following:
DMUS_E_NOT_FOUND |
DMUS_E_NOINTERFACE |
Remarks
The value in lPChannel must be 0 for any stage that is not channel-specific. Objects in the following stages are channel-specific and can be retrieved by setting a channel number or DMUS_PCHANNEL_ALL in lPChannel:
DMUS_PATH_AUDIOPATH_TOOL
DMUS_PATH_BUFFER
DMUS_PATH_BUFFER_DMO
DMUS_PATH_PERFORMANCE_TOOL
DMUS_PATH_PORT
DMUS_PATH_SEGMENT_TOOL
The precedence of the parameters in filtering out unwanted objects is as follows:
If a matching object is found but the class specified by iidInterface cannot be obtained, the method fails.
Not all types of objects that can be retrieved by this method are supported in DirectX for Visual Basic. For example, it would be meaningless to pass DMUS_PATH_PERFORMANCE_TOOL in lStage, because tools are not supported.
See Also