Windows Desktop SDK
The DeviceWrapper class is a C# wrapper layer of LibWebFXScan. More...
Public Member Functions |
|
delegate void | LIBWFXEVENTCB (ENUM_LIBWFX_EVENT_CODE enEventCode, int nParam, IntPtr pUserDef) |
The LIBWFXEVENTCB() type defines a pointer to this callback function. LibWFX_SetProperty() is a placeholder for the application-defined function name. More... |
|
delegate void | LIBWFXCB (ENUM_LIBWFX_NOTIFY_CODE enNotifyCode, IntPtr pUserDef, IntPtr pParam1, IntPtr pParam2) |
The LIBWFXCB() type defines a pointer to this callback function. LibWFX_StartScan() is a placeholder for the application-defined function name. More... |
|
static ENUM_LIBWFX_ERRCODE | LibWFX_Init () |
Init the LibWebFXScan SDK . More... |
|
static ENUM_LIBWFX_ERRCODE | LibWFX_DeInit () |
Deinit the LibWebFXScan SDK . More... |
|
static ENUM_LIBWFX_ERRCODE | LibWFX_GetDeviesList (out IntPtr szDevicesListOut) |
Get devices list. More... |
|
static ENUM_LIBWFX_ERRCODE | LibWFX_GetFileList (out IntPtr szFileListOut) |
Get the imagefile list, but no including tif and pdf. More... |
|
static ENUM_LIBWFX_ERRCODE | LibWFX_RemoveFile (String szFileNameIn) |
Remove the specified file by filename, e.g. "IMG_1.jpg", "*"(delete all file) More... |
|
static ENUM_LIBWFX_ERRCODE | LibWFX_SetProperty (String szRequestCmdIn, [MarshalAs(UnmanagedType.FunctionPtr)] LIBWFXEVENTCB pfnLibWFXEVENTCBIn, IntPtr pUserDefIn) |
Set the property of SDK, LibWebFXScan must do LIBWFX_SETPROPERTY before LIBWFX_STARTSCAN. More... |
|
static ENUM_LIBWFX_ERRCODE | LibWFX_StartScan ([MarshalAs(UnmanagedType.FunctionPtr)] LIBWFXCB pfnLibWFXCBIn, IntPtr pUserDefIn) |
To start do scan. More... |
|
static ENUM_LIBWFX_ERRCODE | LibWFX_Calibrate () |
To do calibrate. More... |
|
static ENUM_LIBWFX_ERRCODE | LibWFX_ECOControl (out uint pulTime, int nSetIn) |
To set or get ECO time. More... |
|
static ENUM_LIBWFX_ERRCODE | LibWFX_PaperReady () |
To check whether the device feed the paper. More... |
|
static ENUM_LIBWFX_ERRCODE | LibWFX_CloseDevice () |
To close device currently. More... |
|
Public Attributes |
|
const String | LIBWFX_DLLNAME = @"LibWebFXScan.dll" |
Detailed Description
The DeviceWrapper class is a C# wrapper layer of LibWebFXScan.
Definition at line 71 of file DeviceWrapper.cs.
Member Function Documentation
◆ LibWFX_Calibrate()
static ENUM_LIBWFX_ERRCODE DeviceWrapper.LibWFX_Calibrate | ( | ) |
To do calibrate.
- Return values
-
LIBWFX_ERRCODE_SUCCESS success LIBWFX_ERRCODE_XXX failed
- Returns
- If no error occurs, LibWFX_Calibrate() return ENUM_LIBWFX_ERRCODE::LIBWFX_ERRCODE_SUCCESS Otherwise, the specific error code can be retrieved by enum ENUM_LIBWFX_ERRCODE
- Note
- none
- Date
- 2017-06-09
◆ LibWFX_CloseDevice()
static ENUM_LIBWFX_ERRCODE DeviceWrapper.LibWFX_CloseDevice | ( | ) |
To close device currently.
- Return values
-
LIBWFX_ERRCODE_SUCCESS success LIBWFX_ERRCODE_XXX failed
- Returns
- If no error occurs, LibWFX_CloseDevice() return ENUM_LIBWFX_ERRCODE::LIBWFX_ERRCODE_SUCCESS Otherwise, the specific error code can be retrieved by enum ENUM_LIBWFX_ERRCODE
- Note
- none
- Date
- 2017-06-09
◆ LibWFX_DeInit()
static ENUM_LIBWFX_ERRCODE DeviceWrapper.LibWFX_DeInit | ( | ) |
Deinit the LibWebFXScan SDK .
- Return values
-
LIBWFX_ERRCODE_SUCCESS success LIBWFX_ERRCODE_XXX failed
- Returns
- If no error occurs, LibWFX_DeInit() return ENUM_LIBWFX_ERRCODE::LIBWFX_ERRCODE_SUCCESS Otherwise, the specific error code can be retrieved by enum ENUM_LIBWFX_ERRCODE
- Note
- none
- Date
- 2017-06-09
◆ LibWFX_ECOControl()
static ENUM_LIBWFX_ERRCODE DeviceWrapper.LibWFX_ECOControl | ( | out uint | pulTime, |
int | nSetIn | ||
) |
To set or get ECO time.
- Parameters
-
[in] pulTime the ECO time, if the time is 0 in set mode, the device will never go to sleep [in] nSetIn 0: Get, 1:Set
- Return values
-
LIBWFX_ERRCODE_SUCCESS success LIBWFX_ERRCODE_XXX failed
- Returns
- If no error occurs, LibWFX_ECOControl() return ENUM_LIBWFX_ERRCODE::LIBWFX_ERRCODE_SUCCESS Otherwise, the specific error code can be retrieved by enum ENUM_LIBWFX_ERRCODE
- Note
- none
- Date
- 2017-06-09
◆ LibWFX_GetDeviesList()
static ENUM_LIBWFX_ERRCODE DeviceWrapper.LibWFX_GetDeviesList | ( | out IntPtr | szDevicesListOut | ) |
Get devices list.
- Parameters
-
[out] szDevicesListOut the json string format that including all devices name, e.g. ["7C1U","65JU",...]
- Return values
-
LIBWFX_ERRCODE_SUCCESS success LIBWFX_ERRCODE_XXX failed
- Returns
- If no error occurs, LIBWFX_GETDEVICESLIST() return ENUM_LIBWFX_ERRCODE::LIBWFX_ERRCODE_SUCCESS Otherwise, the specific error code can be retrieved by enum ENUM_LIBWFX_ERRCODE
- Note
- none
- Date
- 2017-06-09
◆ LibWFX_GetFileList()
static ENUM_LIBWFX_ERRCODE DeviceWrapper.LibWFX_GetFileList | ( | out IntPtr | szFileListOut | ) |
Get the imagefile list, but no including tif and pdf.
- Parameters
-
[out] szFileListOut the json string format that including all image file name, e.g. ["IMG1.jpg","IMG2.jpg",...]
- Return values
-
LIBWFX_ERRCODE_SUCCESS success LIBWFX_ERRCODE_XXX failed
- Returns
- If no error occurs, LibWFX_GetFileList() return ENUM_LIBWFX_ERRCODE::LIBWFX_ERRCODE_SUCCESS Otherwise, the specific error code can be retrieved by enum ENUM_LIBWFX_ERRCODE
- Note
- none
- Date
- 2017-06-09
◆ LibWFX_Init()
static ENUM_LIBWFX_ERRCODE DeviceWrapper.LibWFX_Init | ( | ) |
Init the LibWebFXScan SDK .
- Return values
-
LIBWFX_ERRCODE_SUCCESS success LIBWFX_ERRCODE_XXX failed
- Returns
- If no error occurs, DeviceWrapper::LibWFX_Init() return ENUM_LIBWFX_ERRCODE::LIBWFX_ERRCODE_SUCCESS Otherwise, the specific error code can be retrieved by enum ENUM_LIBWFX_ERRCODE
- Note
- none
- Date
- 2017-06-09
◆ LibWFX_PaperReady()
static ENUM_LIBWFX_ERRCODE DeviceWrapper.LibWFX_PaperReady | ( | ) |
To check whether the device feed the paper.
- Return values
-
LIBWFX_ERRCODE_SUCCESS success LIBWFX_ERRCODE_XXX failed
- Returns
- If no error occurs, LibWFX_PaperReady() return ENUM_LIBWFX_ERRCODE::LIBWFX_ERRCODE_SUCCESS Otherwise, the specific error code can be retrieved by enum ENUM_LIBWFX_ERRCODE
- Note
- none
- Date
- 2017-06-09
◆ LibWFX_RemoveFile()
static ENUM_LIBWFX_ERRCODE DeviceWrapper.LibWFX_RemoveFile | ( | String | szFileNameIn | ) |
Remove the specified file by filename, e.g. "IMG_1.jpg", "*"(delete all file)
- Parameters
-
[in] szFileNameIn the file name or "*"
- Return values
-
LIBWFX_ERRCODE_SUCCESS success LIBWFX_ERRCODE_XXX failed
- Returns
- If no error occurs, LibWFX_RemoveFile() return ENUM_LIBWFX_ERRCODE::LIBWFX_ERRCODE_SUCCESS Otherwise, the specific error code can be retrieved by enum ENUM_LIBWFX_ERRCODE
- Note
- none
- Date
- 2017-06-09
◆ LibWFX_SetProperty()
static ENUM_LIBWFX_ERRCODE DeviceWrapper.LibWFX_SetProperty | ( | String | szRequestCmdIn, |
[MarshalAs(UnmanagedType.FunctionPtr)] LIBWFXEVENTCB | pfnLibWFXEVENTCBIn, | ||
IntPtr | pUserDefIn | ||
) |
Set the property of SDK, LibWebFXScan must do LIBWFX_SETPROPERTY before LIBWFX_STARTSCAN.
- Parameters
-
[in] szRequestCmdIn the command is the json string format, please download document json_command_table.xlsx [in] pfnLibWFXEVENTCBIn the event callback function, LIBWFXEVENTCB() [in] pUserDefIn the user define date
- Return values
-
LIBWFX_ERRCODE_SUCCESS success LIBWFX_ERRCODE_XXX failed
- Returns
- If no error occurs, LibWFX_SetProperty() return ENUM_LIBWFX_ERRCODE::LIBWFX_ERRCODE_SUCCESS Otherwise, the specific error code can be retrieved by enum ENUM_LIBWFX_ERRCODE
- Note
- none
- Date
- 2017-06-09
◆ LibWFX_StartScan()
static ENUM_LIBWFX_ERRCODE DeviceWrapper.LibWFX_StartScan | ( | [MarshalAs(UnmanagedType.FunctionPtr)] LIBWFXCB | pfnLibWFXCBIn, |
IntPtr | pUserDefIn | ||
) |
To start do scan.
- Parameters
-
[in] pfnLibWFXCBIn the notify callback function, LIBWFXCB() [in] pUserDefIn the user define date
- Return values
-
LIBWFX_ERRCODE_SUCCESS success LIBWFX_ERRCODE_XXX failed
- Returns
- If no error occurs, LibWFX_StartScan() return ENUM_LIBWFX_ERRCODE::LIBWFX_ERRCODE_SUCCESS Otherwise, the specific error code can be retrieved by enum ENUM_LIBWFX_ERRCODE
- Note
- none
- Date
- 2017-06-09
◆ LIBWFXCB()
delegate void DeviceWrapper.LIBWFXCB | ( | ENUM_LIBWFX_NOTIFY_CODE | enNotifyCode, |
IntPtr | pUserDef, | ||
IntPtr | pParam1, | ||
IntPtr | pParam2 | ||
) |
The LIBWFXCB() type defines a pointer to this callback function. LibWFX_StartScan() is a placeholder for the application-defined function name.
- Parameters
-
[out] enNotifyCode the notify code, please reference enum ENUM_LIBWFX_NOTIFY_CODE [out] pUserDef the user define data [out] pParam1 case 1: the enNotifyCode is ENUM_LIBWFX_NOTIFY_CODE::LIBWFX_NOTIFY_IMAGE_DONE, pParam1: image path string(ANSI char *), pParam2: the result of recognize((char *)UTF8 json string)
case 2: the enNotifyCode is ENUM_LIBWFX_NOTIFY_CODE::LIBWFX_NOTIFY_EXCEPTION, pParam1: ENUM_LIBWFX_EXCEPTION_CODE, pParam2: image filename string((char *)ANSI string)
case 3: the enNotifyCode is ENUM_LIBWFX_NOTIFY_CODE::LIBWFX_NOTIFY_END, pParam1: NULL, pParam2: NULL[out] pParam2 please reference pParam1 description
- Date
- 2017-06-09
◆ LIBWFXEVENTCB()
delegate void DeviceWrapper.LIBWFXEVENTCB | ( | ENUM_LIBWFX_EVENT_CODE | enEventCode, |
int | nParam, | ||
IntPtr | pUserDef | ||
) |
The LIBWFXEVENTCB() type defines a pointer to this callback function. LibWFX_SetProperty() is a placeholder for the application-defined function name.
- Parameters
-
[out] enEventCode the event code, please reference enum ENUM_LIBWFX_EVENT_CODE [out] nParam none [out] pUserDef the user define data
- Date
- 2017-06-09
Member Data Documentation
◆ LIBWFX_DLLNAME
const String DeviceWrapper.LIBWFX_DLLNAME = @"LibWebFXScan.dll" |
Definition at line 73 of file DeviceWrapper.cs.
The documentation for this class was generated from the following file:
- header/DeviceWrapper.cs