Share via


CopyMediaType (Compact 2013)

3/26/2014

This function copies a task-allocated AM_MEDIA_TYPE structure.

Syntax

HRESULT WINAPI CopyMediaType(
  AM_MEDIA_TYPE* pmtTarget,
  const AM_MEDIA_TYPE* pmtSource
);

Parameters

  • pmtTarget
    Pointer to an area of memory in which to place the new copy of the structure.
  • pmtSource
    Pointer to a source structure to copy.

Return Value

The following table shows the possible return values.

Value

Description

S_OK

Success

E_OUTOFMEMORY

Could not allocate memory for the format section of the target media type.

Remarks

Free the resources in the pmtTarget structure by calling FreeMediaType when your code is done with the structure.

Requirements

Header

dshow.h

Library

Strmiids.lib

See Also

Reference

Media Type Functions