|Microsoft DirectX 9.0|
The AllocPMsg method allocates memory for a performance message.
HRESULT AllocPMsg( ULONG cb, DMUS_PMSG** ppPMSG );
Size of the message structure. This structure is of a type derived from DMUS_PMSG.
Address of a variable that receives the pointer to the allocated message structure.
If the method succeeds, the return value is S_OK.
If it fails, the method can return one of the error values shown in the following table.
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.