DirectX SDK |
The IDirectMusicPerformance::AllocPMsg method allocates a performance message.
HRESULT AllocPMsg( ULONG cb, DMUS_PMSG** ppPMSG );
If the method succeeds, the return value is S_OK.
If it fails, the method can return one of the following error values:
E_INVALIDARG |
E_OUTOFMEMORY |
E_POINTER |
The memory returned is not initialized to any particular state, with the exception of the pTool member of the DMUS_PMSG structure, which is initialized to 0, and the dwSize member, which is set to the value of cb.
Once the message is sent by IDirectMusicPerformance::SendPMsg, the application no longer owns the memory and is not responsible for freeing the message. However, a tool can free a message within its IDirectMusicTool::Flush or its IDirectMusicTool::ProcessPMsg method. Applications are also responsible for freeing notification messages.
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.
IDirectMusicPerformance::FreePMsg, IDirectMusicPerformance::SendPMsg, DirectMusic Messages