IDirectMusicPerformance::AddPort
This method assigns a port to the performance.
HRESULT AddPort(
IDirectMusicPort* pPort
);
Parameters
- pPort
Address of a variable that contains the port to add. If NULL, the default port is added. See Remarks.
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:
DMUS_E_NOT_INIT |
DMUS_E_CANNOT_OPEN_PORT |
E_OUTOFMEMORY |
E_POINTER |
Remarks
If you want to pass NULL to this method, you must first pass NULL to IDirectMusicPerformance::Init.
When the default port is specified by passing NULL in pPort, it is assigned one channel group. If no PChannels have been set up for any other port, PChannels from 0 through 15 are assigned to MIDI channels from 0 through 15.
If pPort is not NULL, the port must be activated by a call to IDirectMusicPort::Activate, and a block of channels must be assigned by a call to IDirectMusicPerformance::AssignPChannelBlock.
This method creates a reference to IDirectMusicPort that is released by IDirectMusicPerformance::RemovePort or IDirectMusicPerformance::CloseDown.
Requirements
OS Versions: Windows CE .NET 4.0 and Windows CE .NET 4.1.
Header: Dmusici.h.
Link Library: Dmusic.lib.
See Also
Default Port | IDirectMusicPerformance::AssignPChannelBlock | IDirectMusicPerformance::CloseDown | IDirectMusicPerformance::Init | IDirectMusicPerformance::RemovePort | IDirectMusicPort::Activate
Last updated on Monday, April 12, 2004
© 1992-2002 Microsoft Corporation. All rights reserved.