Platform SDK: DirectX |
The IDirectMusicPerformance::FreePMsg method frees a message.
HRESULT FreePMsg( DMUS_PMSG* pPMSG );
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_CANNOT_FREE |
E_POINTER |
Most messages are released automatically by the performance once they have been processed, and IDirectMusicPerformance::FreePMsg must not be called on a message that has been sent by using IDirectMusicPerformance::SendPMsg. However, IDirectMusicPerformance::FreePMsg can be used within IDirectMusicTool::ProcessPMsg or IDirectMusicTool::Flush to free a message that is no longer needed. It must also be used to free notification messages.
The method returns DMUS_E_CANNOT_FREE in the following cases:
If there is a value in the pTool, pGraph, or punkUser members (see DMUS_PMSG), each referenced object is released.
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.