Dll说明
/*
* 函数功能:读数据
*
* 输入参数:card_type(卡片类型);keyName(字段名(FileStruct.ini))
*
* 输出参数:data(字段对应的数据);dlen:数据的实际长度
*
* 返回值: 0-成功,其它-失败
*/
EXPORTDLL int STDCALL read_data(const uchar card_type, const char* keyName, uchar *data ,ushort* dlen);
C#调用过程
[DllImport("DLL_HD_DC.dll", CallingConvention = CallingConvention.StdCall)]
public unsafe static extern int read_data(int card_type, byte[] keyName, byte[] data, ref int dlen);
int zk = 0;
int j = CardReader_help.read_data(card_type, keyName, data, ref zk);