MoCreateMediaType
The MoCreateMediaType function allocates a new media type structure.
Syntax
HRESULT MoCreateMediaType(
DMO_MEDIA_TYPE **ppmt,
DWORD cbFormat
);
Parameters
ppmt
Address of a pointer to a DMO_MEDIA_TYPE structure that receives the allocated structure.
cbFormat
Number of bytes to allocate for the format block. Can be zero.
Return Value
Returns an HRESULT value. Possible values include the following.
Result Code | Description |
E_OUTOFMEMORY | Insufficient memory |
E_POINTER | NULL pointer argument |
S_OK | Success |
Remarks
This function allocates a new DMO_MEDIA_TYPE structure and then initializes it by calling the MoInitMediaType function. The caller must delete the media type structure by calling the MoDeleteMediaType function.
Requirements
Header: Declared in Dmort.h; include Dmo.h
Library: Msdmo.lib.
See Also