# RegisterMediaTypes

Registers media types strings.

HRESULT RegisterMediaTypes (

UINT ctypes, | //Number of media type strings in rgszTypes
LPTSTR *rgszTypes, | //Pointer to array of media types to be registered
CLIPFORMAT *rgcfTypes | //Pointer to array of 32-bit values corresponding to rgszType array values
); |

Parameters

ctypes
  [in] Number of media type strings in the rgszTypes array. This parameter cannot be zero.
rgszTypes
  [in] Pointer to an array of strings identifying the media types to be registered. None of the strings in the array can be NULL.
rgcfTypes
  [out] Pointer to an array of the 32-bit values assigned to corresponding media types in rgszTypes.

Return Values

S_OK
  The operation was successful.
E_INVALIDARG
  One or more parameters are invalid.

Remarks

Media types are taken from the following:

Value | Meaning
CF_NULL | 0
SZ_URLCONTEXT | (L”URL Context”)
CFSTR_MIME_FRACTALS | (TEXT(“application/fractals”))
CFSTR_MIME_RAWDATA | (TEXT(“application/octet”))
CFSTR_MIME_POSTSCRIPT | (TEXT(“application/postscript”))
CFSTR_MIME_AIIF | (TEXT(“audio/aiff”))
CFSTR_MIME_BASICAUDIO | (TEXT(“audio/basic”))
CFSTR_MIME_WAV | (TEXT(“audio/wav”))
CFSTR_MIME_X_AIIF | (TEXT(“audio/x-aiif”))
CFSTR_MIME_X_REALAUDIO | (TEXT(“audio/x-pn-realaudio”))
CFSTR_MIME_X_WAV | (TEXT(“audio/x-wav”))
CFSTR_MIME_BMP | (TEXT(“image/bmp”))
CFSTR_MIME_GIF | (TEXT(“image/gif”))
CFSTR_MIME_JPEG | (TEXT(“image/jpeg”))
CFSTR_MIME_TIFF | (TEXT(“image/tiff”))
CFSTR_MIME_XBM | (TEXT(“image/xbm”))
CFSTR_MIME_X_BITMAP | (TEXT(“image/x-bitmap”))
CFSTR_MIME_HTML | (TEXT(“text/html”))
CFSTR_MIME_TEXT | (TEXT(“text/plain”))
CFSTR_MIME_AVI | (TEXT(“video/avi”))
CFSTR_MIME_MPEG | (TEXT(“video/mpeg”))
CFSTR_MIME_QUICKTIME | TEXT(“video/quicktime”))
CFSTR_MIME_X_MSVIDEO | (TEXT(“video/x-msvideo”))
CFSTR_MIME_X_SGI_MOVIE | (TEXT(“video/x-sgi-movie”))

See Also

RegisterMediaTypeClass