数据结构 | |
| struct | BarcodeResult |
| 条码结果 更多... | |
| struct | BarcodeResultArray |
| 识别的条码结果 更多... | |
宏定义 | |
| #define | KSJ_API __declspec(dllimport) |
枚举 | |
| enum | BARCODETYPE { BT_CODE39 = 0x1, BT_CODE128 = 0x2, BT_EAN13 = 0x20, BT_EAN8 = 0x40, BT_UPCA = 0x80, BT_UPCE = 0x100, BT_PDF417 = 0x02000000, BT_QRCODE = 0x04000000, BT_DATAMATRIX = 0x08000000 } |
条码类型 更多... | |
| enum | LOCALIZATIONMODE { LOC_AUTO = 0x01, LOC_CONNECTED_BLOCKS = 0x02, LOC_STATISTICS = 0x04, LOC_LINES = 0x08, LOC_SCAN_DIRECTLY = 0x10, LOC_STATISTICS_MARKS = 0x20, LOC_SKIP = 0x00 } |
定位方式枚举 更多... | |
| enum | CODEGRAYTYPE { CT_DARK = 0x01, CT_BRIGHT = 0x02, CT_BOTH = 0x03 } |
条码颜色枚举 更多... | |
函数 | |
| KSJ_API int __stdcall | KSJBR_CreateInstance (HANDLE *phReader) |
| KSJBR_CreateInstance. | |
| KSJ_API int __stdcall | KSJBR_DestroyInstance (HANDLE *phReader) |
| KSJBR_DestroyInstance. | |
| KSJ_API int __stdcall | KSJBR_SetTimeOut (HANDLE hReader, int nTimeOutMS) |
| KSJBR_SetTimeOut. | |
| KSJ_API int __stdcall | KSJBR_GetTimeOut (HANDLE hReader, int *pnTimeOutMS) |
| KSJBR_GetTimeOut. | |
| KSJ_API int __stdcall | KSJBR_SetCodeType (HANDLE hReader, int nBarCodeTypes) |
| KSJBR_SetCodeType. | |
| KSJ_API int __stdcall | KSJBR_GetCodeType (HANDLE hReader, int *pnBarCodeTypes) |
| KSJBR_GetCodeType. | |
| KSJ_API int __stdcall | KSJBR_SetLocalizationMode (HANDLE hReader, int nLocalizationMode) |
| KSJBR_SetLocalizationMode. | |
| KSJ_API int __stdcall | KSJBR_GetLocalizationMode (HANDLE hReader, int *pnLocalizationMode) |
| KSJBR_GetLocalizationMode. | |
| KSJ_API int __stdcall | KSJBR_SetCodeGrayType (HANDLE hReader, CODEGRAYTYPE type) |
| KSJBR_SetCodeGrayTyep. | |
| KSJ_API int __stdcall | KSJBR_GetCodeGrayType (HANDLE hReader, CODEGRAYTYPE *pType) |
| KSJBR_GetCodeGrayType. | |
| KSJ_API int __stdcall | KSJBR_SetExpectedBarcodesCount (HANDLE hReader, int nCount) |
| KSJBR_SetExpectedBarcodesCount. | |
| KSJ_API int __stdcall | KSJBR_GetExpectedBarcodesCount (HANDLE hReader, int *pnCount) |
| KSJBR_GetExpectedBarcodesCount. | |
| KSJ_API int __stdcall | KSJBR_InitRuntimeSettingsWithFile (HANDLE hReader, const char *pSettingFile) |
| KSJBR_InitRuntimeSettingsWithFile. | |
| KSJ_API int __stdcall | KSJBR_Decode (HANDLE hReader, BarcodeResultArray **pResults, unsigned char *pBufferBytes, int nWidth, int nHeight, int nStride) |
| KSJBR_Decode. | |
| KSJ_API void __stdcall | KSJBR_FreeTextResults (BarcodeResultArray **pResults) |
| KSJBR_FreeTextResults. | |
| #define KSJ_API __declspec(dllimport) |
| enum BARCODETYPE |
| enum LOCALIZATIONMODE |
| enum CODEGRAYTYPE |
| KSJ_API int __stdcall KSJBR_CreateInstance | ( | HANDLE * | phReader | ) |
KSJBR_CreateInstance.
-----------------------------------------------------------------------------
创建一个解码库句柄
| phReader[out] | 返回解码库句柄 |
| KSJ_API int __stdcall KSJBR_DestroyInstance | ( | HANDLE * | phReader | ) |
KSJBR_DestroyInstance.
-----------------------------------------------------------------------------
释放解码库资源
-----------------------------------------------------------------------------
| KSJ_API int __stdcall KSJBR_SetTimeOut | ( | HANDLE | hReader, | |
| int | nTimeOutMS | |||
| ) |
KSJBR_SetTimeOut.
-----------------------------------------------------------------------------
设置超时时间
| hReader[in] | 解码库句柄 | |
| nTimeOutMS[in] | 超时时间,单位:毫秒 |
-----------------------------------------------------------------------------
| KSJ_API int __stdcall KSJBR_GetTimeOut | ( | HANDLE | hReader, | |
| int * | pnTimeOutMS | |||
| ) |
KSJBR_GetTimeOut.
-----------------------------------------------------------------------------
设置超时时间
| hReader[in] | 解码库句柄 | |
| pnTimeOutMS[out] | 超时时间,单位:毫秒 |
-----------------------------------------------------------------------------
| KSJ_API int __stdcall KSJBR_SetCodeType | ( | HANDLE | hReader, | |
| int | nBarCodeTypes | |||
| ) |
KSJBR_SetCodeType.
-----------------------------------------------------------------------------
设置解码库的条码类型
| hReader[in] | 解码库句柄 | |
| nBarCodeType[in] | 参考上面定义的条码类型枚举定义,可以设置为多种类型,每一位对应一种类型 |
-----------------------------------------------------------------------------
| KSJ_API int __stdcall KSJBR_GetCodeType | ( | HANDLE | hReader, | |
| int * | pnBarCodeTypes | |||
| ) |
KSJBR_GetCodeType.
-----------------------------------------------------------------------------
获取当前解码库设置的条码类型
| hReader[in] | 解码库句柄 | |
| pnBarCodeType[out] | 输出条码类型,参考上面定义的码类型枚举定义,每一位对应一种类型 |
-----------------------------------------------------------------------------
| KSJ_API int __stdcall KSJBR_SetLocalizationMode | ( | HANDLE | hReader, | |
| int | nLocalizationMode | |||
| ) |
KSJBR_SetLocalizationMode.
-----------------------------------------------------------------------------
设置解码库的条码定位方式
| hReader[in] | 解码库句柄 | |
| nLocalizationMode[in] | 参考上面定义的条码定位类型枚举定义,可以设置为多种类型,每一位对应一种类型 |
-----------------------------------------------------------------------------
| KSJ_API int __stdcall KSJBR_GetLocalizationMode | ( | HANDLE | hReader, | |
| int * | pnLocalizationMode | |||
| ) |
KSJBR_GetLocalizationMode.
-----------------------------------------------------------------------------
设置解码库的条码定位方式
| hReader[in] | 解码库句柄 | |
| pnLocalizationMode[out] | 参考上面定义的条码定位类型枚举定义,可以设置为多种类型,每一位对应一种类型 |
-----------------------------------------------------------------------------
| KSJ_API int __stdcall KSJBR_SetCodeGrayType | ( | HANDLE | hReader, | |
| CODEGRAYTYPE | type | |||
| ) |
KSJBR_SetCodeGrayTyep.
-----------------------------------------------------------------------------
设置解码库的条码颜色
| hReader[in] | 解码库句柄 | |
| type[in] | 参考上面定义的条码颜色类型枚举定义 |
-----------------------------------------------------------------------------
| KSJ_API int __stdcall KSJBR_GetCodeGrayType | ( | HANDLE | hReader, | |
| CODEGRAYTYPE * | pType | |||
| ) |
KSJBR_GetCodeGrayType.
-----------------------------------------------------------------------------
获取解码库的条码颜色
| hReader[in] | 解码库句柄 | |
| pType[out] | 参考上面定义的条码颜色类型枚举定义 |
-----------------------------------------------------------------------------
| KSJ_API int __stdcall KSJBR_SetExpectedBarcodesCount | ( | HANDLE | hReader, | |
| int | nCount | |||
| ) |
KSJBR_SetExpectedBarcodesCount.
-----------------------------------------------------------------------------
设置解码库的最大条码数量
| hReader[in] | 解码库句柄 | |
| nCount[in] | 最大的条码数量 |
-----------------------------------------------------------------------------
| KSJ_API int __stdcall KSJBR_GetExpectedBarcodesCount | ( | HANDLE | hReader, | |
| int * | pnCount | |||
| ) |
KSJBR_GetExpectedBarcodesCount.
-----------------------------------------------------------------------------
获取解码库的最大条码数量
| hReader[in] | 解码库句柄 | |
| pnCount[out] | 最大的条码数量 |
-----------------------------------------------------------------------------
| KSJ_API int __stdcall KSJBR_InitRuntimeSettingsWithFile | ( | HANDLE | hReader, | |
| const char * | pSettingFile | |||
| ) |
KSJBR_InitRuntimeSettingsWithFile.
-----------------------------------------------------------------------------
使用配置文件设置解码库的参数
| hReader[in] | 解码库句柄 | |
| pSettingFile[in] | 配置文件 |
-----------------------------------------------------------------------------
| KSJ_API int __stdcall KSJBR_Decode | ( | HANDLE | hReader, | |
| BarcodeResultArray ** | pResults, | |||
| unsigned char * | pBufferBytes, | |||
| int | nWidth, | |||
| int | nHeight, | |||
| int | nStride | |||
| ) |
KSJBR_Decode.
-----------------------------------------------------------------------------
解码
| hReader[in] | 解码库句柄 | |
| pResults[out] | 解码结果,参考BarcodeResultArray/BarcodeResult的定义 | |
| pBufferBytes[in] | 保存图像数据的地址指针,图像必须是8位灰度图 | |
| nWidth[in] | 图像宽度 | |
| nHeight[in] | 图像高度 | |
| nStride[in] | 图像行长 |
| KSJ_API void __stdcall KSJBR_FreeTextResults | ( | BarcodeResultArray ** | pResults | ) |
KSJBR_FreeTextResults.
-----------------------------------------------------------------------------
释放条码信息资源
| pResults[in] | 条码信息数据指针,由解码KSJBR_Decode输出 |
-----------------------------------------------------------------------------