IDirectMusic::Activate

The IDirectMusic::Activate method activates or deactivates all output ports created from this interface.

HRESULT Activate(
  BOOL fEnable
);
 

Parameters

fEnable
Switch to activate (TRUE) or deactivate (FALSE) all port objects created in this instance of DirectMusic.

Return Values

If the method succeeds, the return value is S_OK.

Remarks

Applications should call IDirectMusic::Activate(FALSE) when they lose input focus if they do not need to play music in the background. This will allow another application that may have the input focus to have access to the ports. Once the application has input focus again, it should call Activate(TRUE) to enable all of its allocated ports.

QuickInfo

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

See Also

IDirectMusicPort::Activate