Windows Media Format SDK banner art
PreviousNext

IWMDMDeviceControl::Record

The Record method begins recording at the current position within the content.

Syntax

HRESULT Record(
  _WAVEFORMATEX*  pFormat
);

Parameters

  pFormat

[in]  Pointer to a _WAVEFORMATEX structure that holds the format in which the data should be recorded.

Return Values

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Return code Description
E_BUSY The device is already performing an operation.
WMDM_E_NOTSUPPORTED The record function is not implemented on this device.
E_FAIL An unspecified error occurred.

Remarks

This method is used to invoke recording of either live content or stored media. The Seek method is used to determine which type of recording is performed.

Some devices do not support recording. The GetCapabilities method should be called prior to attempting the Record method. If unsupported recording is attempted, this method returns WMDM_E_NOTSUPPORTED.

The pFormat parameter can be supplied to specify a specific audio data format for recording. See IWMDMDevice::GetFormatSupport for information on how to determine supported formats on the device. If the pFormat parameter is set to NULL, the device will record audio data in the default format.

When you use device recording, you must enumerate the storage medium contents to find the new object after the record operation is completed.

See Also

PreviousNext


© 1999 Microsoft Corporation. All rights reserved.