Microsoft DirectX 8.0 (C++) |
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 dwSize member of the message structure is set to the value of cb. Other members are not necessarily initialized to zero, because of internal caching.
After the message is sent by IDirectMusicPerformance8::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 IDirectMusicTool8::Flush or its IDirectMusicTool8::ProcessPMsg method. Applications are also responsible for freeing notification messages.
Header: Declared in dmusici.h.
IDirectMusicPerformance8::FreePMsg, IDirectMusicPerformance8::SendPMsg, DirectMusic Messages