获取卡的属性。

参数
[in] hcontexthandle
一个已经成功打开的设备的句柄。
[out] puchproperty
取得的属性数据,动态分配缓冲区时,可以将该位设为null,以获得属性数据的长度,结果在pulpropertylen中。
[in,out] pulpropertylen
要取得的属性数据长度。
[in] ulflag
ulflag:参数,定义如下
esf_return_device_serail:取得设备序列号
esf_return_device_capabilities:取得设备最大的存储空间
esf_return_device_free_room:取得设备剩下的存储空间
esf_return_device_security:取得当前df下的安全状态
esf_return_pin_len:取得设备允许的pin的长度,第一个字节为pin的最大长度,第二个字节为pin的最小长度
esf_return_lib_version:取得库的版本号。
要求
esfp_opendev
返回值
esf_success:成功
esf_rv_parameter_error:参数错误,函数调用的参数可能不符合要求
其它:见“api返回码说明”。
示例代码
esf_handle hcontexthandle = null;
esf_rv irv;
unsigned char uchbuf_property;
unsigned long ullen = 0;
unsigned char uchbuf_property[16];
unsigned int i = 0;
irv = esfp_getproperty(hcontexthandle, null, &ullen, esf_return_device_serail);
irv = esfp_getproperty(hcontexthandle, uchbuf_property, &ullen, esf_return_device_serail);
for(i=0; i[ullen; i++)
{
printf("%x", uchbuf_property[i]);
}
printf("\n");
irv = esfp_getproperty(hcontexthandle, null, &ullen, esf_return_device_capabilities);
irv = esfp_getproperty(hcontexthandle, uchbuf_property, &ullen, esf_return_device_capabilities);
return irv;
puchproperty为null时, pulpropertylen返回属性数据的长度。
参见
esfp_setproperty