DirectX SDK

IDirectMusicPerformance::PChannelInfo

The IDirectMusicPerformance::PChannelInfo method retrieves the port, group, and MIDI channel for a given performance channel.

HRESULT PChannelInfo(
  DWORD dwPChannel, 
  IDirectMusicPort** ppPort,
  DWORD* pdwGroup,
  DWORD* pdwMChannel
);

Parameters

dwPChannel
PChannel for which information is desired.
ppPort
Address of a variable to receive an IDirectMusicPort pointer. This value can be NULL if the pointer is not wanted. If a non-NULL pointer is returned, the reference count is incremented, and it is the responsibility of the application to call Release on the pointer. See also Remarks.
pdwGroup
Address of a variable to receive the group on the port. Can be NULL if this value is not wanted.
pdwMChannel
Address of a variable to receive the MIDI channel on the group. Can be NULL if this value is not wanted.

Return Values

If the method succeeds, the return value is S_OK.

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

E_INVALIDARG
E_POINTER

Remarks

A NULL pointer is returned in *ppPort if the port has been removed by a call to IDirectMusicPerformance::RemovePort, but the method succeeds.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in dmusici.h.

See Also

IDirectMusicPerformance::AssignPChannel, IDirectMusicPerformance::AssignPChannelBlock