Share via


IWMDMDeviceControl::Record (deprecated)

banner art

This is preliminary documentation and subject to change.

This topic documents a feature of the Windows Media Device Manager SDK. We recommend that you migrate your application to use the Windows Portable Devices API. For more information, see the Windows Portable Devices SDK.

The Record method begins recording from the device's external record input at the current seek position. The IWMDMDeviceControl::Seek method must be called first.

Syntax

HRESULT Record(
  _WAVEFORMATEX*  pFormat
);

Parameters

pFormat

[in]  Pointer to a _WAVEFORMATEX structure specifying the format in which the data must be recorded.

Return Values

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK The method succeeded.
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 both device recording (recording of an audio track to be stored on the media device) and streaming audio data from the media device to be recorded on the computer. The Seek method determines which form of recording occurs.

Some devices do not support either type of recording. The GetCapabilities method must be called before you start recording. If an unsupported type of recording is attempted, this method returns WMDM_E_NOTSUPPORTED.

An argument can be supplied for the pFormat parameter to specify an audio format for recording. To determine the formats supported by the device, see GetFormatSupport. If the pFormat parameter is set to NULL, the device records 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 finished.

Requirements

Header: Defined in mswmdm.h.

Library: mssachlp.lib

See Also