VoiceRecorder_Create

This function loads and initializes the Voice Recorder control.

At a Glance

Header file: VoiceCtl.h
Windows CE Versions: 2.01 and later

Syntax

HWND VoiceRecorder_Create(CM_VOICE_RECORDER * lpCMVR);

Parameters

lpCMVR
Long pointer to a CM_VOICE_RECORDER structure that represents the voice recorder control.

Return Values

The handle to the new Voice Recorder window indicates success. NULL indicates failure.

Remarks

This is the only exposed function for the Voice Recorder control. The Voice Recorder control is implemented in VoiceCtl.dll and responds to messages from its owner application. Specifically, the owner window can access the recording process by using the following messages: VRM_RECORD, VRM_PLAY, VRM_STOP, VRM_CANCEL, and VRM_OK. In addition, the Voice Recorder control can send notifications to its parent window using a NM_VOICE_RECORDER structure. This structure can contain the following messages: VRN_RECORD_START, VRN_RECORD_STOP, VRN_PLAY_START, VRN_PLAY_STOP, VRN_CANCEL, VRN_OK, and VRN_ERROR. NM_VOICE_RECORDER can also contain the error values described in the following table.

Error value
Description
ER_SUCCESS No error
ER_FAIL Unknown error
ER_OUTOFMEMORY Out of memory
ER_UNUSED1 Reserved
ER_INVALIDEPARAM Invalid parameters
ER_UNUSED2 Reserved
ER_WRITE_FILE_FAIL Error while writing to a file
ER_UNUSED3 Reserved
ER_OOM_STORAGE Out of storage
ER_MAX_FILE_SIZE Maximum file size reached during recording
ER_BUSY Control is busy recording or playing

See Also

NM_VOICE_RECORDER, VRM_CANCEL, VRM_OK, VRM_PLAY, VRM_RECORD, VRM_STOP