博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ePass1000 Full ActiveX Control Reference Manual Version 2.0
阅读量:5905 次
发布时间:2019-06-19

本文共 6225 字,大约阅读时间需要 20 分钟。

ePass1000 Full ActiveX Control Reference Manual Version 2.0

Error Code Value

Return Status Description Value(HEX) Value(DEC)
FT_COMMUNICATIONS_ERROR Exception occured during transfer data between device and driver. Driver recerved an invalid response from the device. Rarely occur. Try again, reboot the machine and restart the application. 0x08 8
FT_INVALID_RESP_SIZE Abnormal response received from the device. Rarely occur. Try again, reboot the machine and restart the application. 0x0D 13
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       

ChangeDir

The ChangeDir method changes the current directory. 

HRESULTChangeDir(    [in] long ,    [in] long ,    [in[ unsigned char* ,        );

Parameters

lFlags[in] A bit mask defining the options for directory. changing. You may use OR operation to enable one or more options :

Flag Meaning  
EPAS_DIR_BY_ID When this flag is set, lDirID parameter contain ID of the directory to be changed into. This flag may be combined with EPAS_DIR_FROM_MF or EPAS_DIR_FROM_CUR_DF. lDirID must be a 16-bit directory ID.  
EPAS_DIR_BY_LONG_ID When this flag is set, lDirID parameter contain ID of the directory to be changed into. This flag may be combined with EPAS_DIR_FROM_MF, EPAS_DIR_FROM_CUR_DF, or EPAS_DIR_TO_PARENT.  
EPAS_DIR_BY_NAME When this flag is set, pName parameter contain Application Name of the directory to be changed into. This flag cannot combine with others.  
EPAS_DIR_BY_GUID When this flag is set, pName parameter contain Application GUID of the directory to be changed into. This flag cannot combine with others.  
EPAS_DIR_BY_GUID_STR When this flag is set, pName parameter contain Application GUID string of the directory to be changed into. This flag cannot combine with others.  

此函数的lFlags参数在Private\Include\EPASSAPI.H中的Flags used for directory type部分

#define EPAS_DIR_BY_ID 0x00000100

#define EPAS_DIR_BY_LONG_ID 0x00000200
#define EPAS_DIR_BY_NAME 0x00000300
#define EPAS_DIR_BY_GUID 0x00000400
#define EPAS_DIR_BY_GUID_STR 0x00000500
#define EPAS_DIR_BY_MASK 0x00000f00

 

OpenDevice

The OpenDevice method finds and opens an ePass1000 for exclusive access, and create a session between application and device for further operation.

HRESULTOpenDevice(    [in]long          ,     [in]unsigned char* );
 

Requirement

Parameters

lFlags
[in]This parameter defines a bit mask of options for opening a device. You may use bit-wise OR operation to select more than one option. This parameter can be a combination of one or more of the following flags:
Flag Meaning  
EPAS_OPEN_FIRST Open the first found device. This flag can be combined with EPAS_OPEN_BY_NAME, EPAS_OPEN_BY_GUID or EPAS_OPEN_BY_GUID_STR. 0x00000000
EPAS_OPEN_NEXT Open the next device. This flag can be combined with EPAS_OPEN_BY_NAME, EPAS_OPEN_BY_GUID or EPAS_OPEN_BY_GUID_STR. 0x00000001
EPAS_OPEN_CURRENT Open the currently opened device. This flag can NOT be combined with other flags. 0x00000002
EPAS_OPEN_SPECIFIC Open the device, that has same serial number value as which specified by pAppID parameter. This flag can NOT be combined with other flags. 0x00000003
EPAS_OPEN_BY_NAME Open the device containing a directory name pointed to by pAppID. This parameter may be combined with EPAS_OPEN_FIRST or EPAS_OPEN_NEXT. 0x00000100
EPAS_OPEN_BY_GUID Open the device containing a directory GUID as specified by pAppID. This flag must combined with EPAS_OPEN_FIRST or EPAS_OPEN_NEXT. 0x00000200
EPAS_OPEN_BY_GUID_STR Open the device containing a directory GUID as specified by pAppID. This flag must combined with EPAS_OPEN_FIRST or EPAS_OPEN_NEXT. 0x00000300
pAppID
[in]This optional parameter provide additional information for the open. This parameter is only used if one of the following flags is assigned. If none of the flags below are assigned,
pAppID should be set to NULL.
Flag Meaning
EPAS_OPEN_SPECIFIC pAppID point to an array of two unsigned longs which specified serial number of the device to be opened. Use function to obtain a device's serial number.
EPAS_OPEN_BY_NAME pAppID point to a NULL terminated string that specifies the Application Directory Name to open. If a device is opened, the current directory will be set to the directory ID defined by the Application Directory Name.
EPAS_OPEN_BY_GUID pAppID point to an array of 16 bytes that specified the Application Directory GUID to open. If a device is opened, the current directory will be set to the directory ID defined by the Application Directory GUID.
EPAS_OPEN_BY_GUID_STR pAppID point to a NULL terminated string that specifies the Application Directory GUID to open. If a device is opened, the current directory will be set to the directory ID defined by the Application Directory GUID. The string format is "{xxxxxxxx - xxxx - xxxx - xxxx - xxxxxxxxxxxx}". Dashes and braces are optional.
 

Remarks

The order of devices opened (first and next) is based on the order they were detected by the system. To enumerate all devices connected to the system, use EPAS_OPEN_FIRST and EPAS_OPEN_NEXT until FT_UNIT_NOT_FOUND is returned.

Application access to ePass1000 is exclusive. Only one application can open an ePass1000 at one time. If any other application attempt to open this ePass1000, will get return code FT_DEVICE_IN_USE.

You can open specific ePass1000 by combining EPAS_OPEN_FIRST, EPAS_OPEN_NEXT flags with EPAS_OPEN_BY_NAME , EPAS_OPEN_BY_GUID, or EPAS_OPEN_BY_GUID_STR.

If you known serial number of the ePass1000 you intend to open, use EPAS_OPEN_SPECIFIC.

Return Values

If the function succeeds, FT_SUCCESS returned.

If the library failed to open the device driver, FT_CANNOT_OPEN_DRIVER is returned.

If the library do not support version of the driver, FT_INVALID_DRVR_VERSION is returned.

If there is no device connected to the system currently, FT_UNIT_NOT_FOUND is returned.

If the device is already opened by another application, FT_DEVICE_IN_USE is returned.

For a list of all return codes, see .

/// Flags used by epas_OpenDevice()
//
#define EPAS_OPEN_NEXT 0x00000000
#define EPAS_OPEN_FIRST 0x00000001
#define EPAS_OPEN_CURRENT 0x00000002
#define EPAS_OPEN_SPECIFIC 0x00000003

#define EPAS_OPEN_MASK 0x00000007

#define EPAS_OPEN_BY_NAME 0x00000100

#define EPAS_OPEN_BY_GUID 0x00000200
#define EPAS_OPEN_BY_GUID_STR 0x00000300

#define EPAS_OPEN_BY_MASK 0x00000F00

转载地址:http://jrdpx.baihongyu.com/

你可能感兴趣的文章
Android 四大组件之一(Activity)
查看>>
扫描(一)
查看>>
Centos7安装rabbitmq server 3.6.0
查看>>
iostat命令学习
查看>>
html video的url更新,自动清缓存
查看>>
【11】ajax请求后台接口数据与返回值处理js写法
查看>>
Python菜鸟之路:Jquery Ajax的使用
查看>>
LeetCode算法题-Maximum Depth of Binary Tree
查看>>
Cox 教学视频5
查看>>
Jenkins持续集成学习-搭建jenkins问题汇总
查看>>
使用ffmpeg实现对h264视频解码 -- (实现了一个易于使用的c++封装库)
查看>>
flink watermark介绍
查看>>
Android Xutils 框架
查看>>
Sysbench 0.5版安装配置
查看>>
书摘—你不可不知的心理策略
查看>>
【博客话题】毕业——开始人生的艰苦历程
查看>>
Linux安装telnet
查看>>
sap scriptfom 多语言翻译
查看>>
黄聪:3分钟学会sessionStorage用法
查看>>
Entity Framework 全面教程详解(转)
查看>>