Share via


IDirectMusicPerformance::AssignPChannel

This method assigns a single performance channel (PChannel) to the performance and maps it to a port, group, and MIDI channel.

HRESULT AssignPChannel(
  DWORD dwPChannel,
  IDirectMusicPort* pPort,
  DWORD dwGroup,
  DWORD dwMChannel
);

Parameters

  • dwPChannel
    PChannel to assign.
  • pPort
    Address of a variable that contains the port to which the PChannel is assigned.
  • dwGroup
    Channel group on the port.
  • dwMChannel
    Channel in the group. Must be in the range from 0 through 15.

Return Values

If the method succeeds, the return value is S_OK, or S_FALSE (see Remarks).

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

E_INVALIDARG
E_POINTER

Remarks

The method returns S_FALSE if dwGroup is out of the range of the port. The channel has been assigned, but the port cannot play this group.

The method returns E_INVALIDARG if dwMChannel is out of range or the port has not been added to the performance through a call to the IDirectMusicPerformance::AddPort method.

Requirements

OS Versions: Windows CE .NET 4.0 and Windows CE .NET 4.1.
Header: Dmusici.h.
Link Library: Dmusic.lib.

See Also

Channels | IDirectMusicPerformance::AddPort | IDirectMusicPerformance::AssignPChannelBlock | IDirectMusicPerformance::PChannelInfo

 Last updated on Monday, April 12, 2004

© 1992-2002 Microsoft Corporation. All rights reserved.