IDirectMusic8::Activate
Warning: This technology is deprecated as is all of DirectMusic. Deprecated components are considered obsolete. While these components are still supported, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.
Deprecated.
The Activate method activates or deactivates all ports created from this interface.
Syntax
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.
If it fails, the method can return DSERR_NODRIVER, indicating that no sound driver is present.
Remarks
Applications should call Activate(FALSE) when they lose input focus if they do not need to play sounds in the background. This allows another application that has the input focus to have access to the ports. When the application has input focus again, it should call Activate(TRUE) to enable all its allocated ports.
Requirements
** Minimum Supported Client:** Windows 2000.
** Minimum Supported Server:** Windows 2000 Server.
** Header:** Dmusicc.h
Library: Dmusic.dll
See Also