BB FlashBack SDK: FBRecorder

OnError

Description

This event handler can be used to catch internal FBRecorder errors, and display messages to the end-user, or write messages to a log file.
 

Syntax

[C#/C++]
public void OnError (long ErrCode);

[VB.NET]
Public Sub OnError (ByVal ErrCode As Integer)
 

Parameters

ErrCode - the code of the error message 
 

Remarks

Use FBRecorder::GetErrorText to retrieve the message corresponding to the error code passed into this event handler.
 

Setting the event handler

[C#]
fbEditor.OnError += new IFBEditorEvents_OnErrorEventHandler(OnErrorHandler);
 

[VB]
AddHandler fbEditor.OnError, AddressOf OnErrorHandler
 

[Delphi]
FBEditor.OnError := OnErrorHandler;
 

[C++ Builder]
Editor->OnError = OnErrorHandler;
 

See Also

FBRecorder::GetErrorText

 

List of error codes

Here is a full list of error codes returned to the OnError callback

#define REC_ERROR_NO_ERRORS_0                                0

#define REC_ERROR_NO_BBCAP_DRIVER_FOUND_1                    1

#define REC_ERROR_CANT_CHANGE_DISPLAY_SETTINGS_2             2

#define REC_ERROR_CANT_ACCESS_REGISTRY_3                     3

#define REC_ERROR_CANT_ACCESS_HARDWARE_PROFILES_KEY_4        4

#define REC_ERROR_CANT_SET_ATTACH_TO_DESKTOP_5               5

#define REC_ERROR_CANT_CREATE_BBCAP_SURFACE_6                6

#define REC_ERROR_DRIVER_IS_NOT_ALIVE_7                      7

#define REC_ERROR_DRIVER_HAS_INVALID_VERSION_8               8

#define REC_ERROR_DRIVER_WAS_NOT_UNINITIALIZED_9             9

#define REC_ERROR_DRIVER_WAS_NOT_INITIALIZED_10              10

#define REC_ERROR_DRIVER_WAS_NOT_LOADED_11                   11

#define REC_ERROR_ENUM_DISPLAY_SETTINGS_12                   12

#define REC_ERROR_DRIVER_HAS_INVALID_VERSION_BBCAP_13        13

#define REC_ERROR_DRIVER_HAS_INVALID_VERSION_BBCHLP_14       14

#define REC_ERROR_RECORD_TYPE_NOT_SUPPORTED_15               15

#define REC_ERROR_RECORDER_WAS_NOT_INITIALIZED_16            16

#define REC_ERROR_CANT_CREATE_FILES_17                       17

#define REC_ERROR_CANT_CREATE_DC_18                          18

#define REC_ERROR_CANT_CREATE_MEMDC_19                       19

#define REC_ERROR_CANT_ALLOCATE_MEMORY_20                    20

#define REC_ERROR_CANT_CREATE_THREAD_21                      21

#define REC_ERROR_DRIVER_RETURNED_INVALID_POINTERS_22        22

#define REC_ERROR_RECORDER_WAS_NOT_STARTED_23                23

#define REC_ERROR_CANT_EXTRACT_DRVINSTALLER_24               24

#define REC_ERROR_INVALID_BITMAP_DIMENSIONS_25               25

#define REC_ERROR_BINARY_FILE_IS_NULL_26                     26

#define REC_ERROR_NOT_BITMAP_MODE_27                         27

#define REC_ERROR_BITMAP_IS_INVALID_28                       28

#define REC_ERROR_GETDIBBITS_29                              29

#define REC_ERROR_DRIVER_WAS_UNINITIALIZED_BY_ANOTHER_APP_30 30

#define REC_ERROR_DRIVER_IS_NOT_ACTIVE_31                    31

#define REC_ERROR_CANT_USE_DDCAPTURE_32                      32

#define REC_ERROR_CREATEDIBSECTION_ERROR_33                  33

#define REC_ERROR_RECORDER_IN_PAUSE_MODE_34                  34

#define REC_ERROR_CANT_CREATE_FONT_35                        35

#define REC_ERROR_INVALID_MONITOR_INDEX_36                   36

#define REC_ERROR_NO_WEBCAMERA_37                            37

#define REC_ERROR_CANT_SET_MOUSE_HOOK_38                     38

#define REC_ERROR_CANT_SET_KEYBOARD_HOOK_39                  39

#define REC_ERROR_NO_RECORDER_OBJECT_OR_NOT_VISTA_40         40

#define REC_ERROR_NO_RECORDER_OBJECT_41                      41

#define REC_ERROR_NO_RECORDER_OBJECT_OR_INVALID_INDEX_42     42

#define REC_ERROR_INVALID_ERROR_CODE_43                      43

#define REC_ERROR_INVALID_SOUND_SRC_INDEX_44                 44

#define REC_ERROR_CANT_USE_DD_ON_VISTA_45                    45

#define REC_ERROR_INVALID_REGION_SIZE_46                     46

#define REC_ERROR_MONITOR_INDEX_OUT_OF_BOUNDS_47             47

#define REC_ERROR_NOT_COMP_MODE_48                           48

#define REC_ERROR_NOT_REGION_MODE_49                         49

#define REC_ERROR_DD_SURFACE_WAS_LOST_50                     50