SynPublic.h
7.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
#pragma once
#pragma pack(1)
typedef struct tagIDCardData{
char Name[32]; //姓名
char Sex[6]; //性别
char Nation[20]; //名族
char Born[18]; //出生日期
char Address[72]; //住址
char IDCardNo[38]; //身份证号
char GrantDept[32]; //发证机关
char UserLifeBegin[18]; // 有效开始日期
char UserLifeEnd[18]; // 有效截止日期
char reserved[38]; // 保留
char PhotoFileName[255];// 照片路径
}IDCardData;
typedef struct tagIDCardData2{
char Name[32]; //姓名
char Sex[4]; //性别
char Nation[6]; //名族
char Born[18]; //出生日期
char Address[72]; //住址
char IDCardNo[38]; //身份证号
char GrantDept[32]; //发证机关
char UserLifeBegin[18]; // 有效开始日期
char UserLifeEnd[18]; // 有效截止日期
char reserved[38]; // 保留
char PhotoWLT[1024]; // WLT照片
}IDCardData2;
#pragma pack()
extern "C"{
//////////////////////////////////////////////////////////////////////////
// SAM端口函数
//
//////////////////////////////////////////////////////////////////////////
int _stdcall Syn_GetCOMBaud ( int iPort, unsigned int * puiBaudRate );
int _stdcall Syn_SetCOMBaud ( int iPort, unsigned int uiCurrBaud, unsigned int uiSetBaud );
int _stdcall Syn_OpenPort( int iPort );
int _stdcall Syn_ClosePort( int iPort );
//////////////////////////////////////////////////////////////////////////
// SAM类函数
//
//////////////////////////////////////////////////////////////////////////
int _stdcall Syn_SetMaxRFByte ( int iPort, unsigned char ucByte,int bIfOpen );
int _stdcall Syn_ResetSAM ( int iPort, int iIfOpen );
int _stdcall Syn_GetSAMStatus ( int iPort, int iIfOpen );
int _stdcall Syn_GetSAMID ( int iPort, unsigned char * pucSAMID, int iIfOpen );
int _stdcall Syn_GetSAMIDToStr ( int iPort, char * pcSAMID, int iIfOpen );
//////////////////////////////////////////////////////////////////////////
// 身份证卡类函数
//
//////////////////////////////////////////////////////////////////////////
int _stdcall Syn_StartFindIDCard ( int iPort , unsigned char * pucIIN, int iIfOpen );
int _stdcall Syn_SelectIDCard ( int iPort , unsigned char * pucSN, int iIfOpen );
int _stdcall Syn_ReadBaseMsg (
int iPort ,
unsigned char * pucCHMsg ,
unsigned int * puiCHMsgLen ,
unsigned char * pucPHMsg ,
unsigned int * puiPHMsgLen ,
int iIfOpen);
int _stdcall Syn_ReadBaseMsgToFile (
int iPort,
char * pcCHMsgFileName,
unsigned int * puiCHMsgFileLen,
char * pcPHMsgFileName,
unsigned int * puiPHMsgFileLen,
int iIfOpen
);
int _stdcall Syn_ReadBaseFPMsg(
int iPort,
unsigned char * pucCHMsg,
unsigned int * puiCHMsgLen,
unsigned char * pucPHMsg,
unsigned int * puiPHMsgLen,
unsigned char * pucFPMsg,
unsigned int * puiFPMsgLen,
int iIfOpen
);
int _stdcall Syn_ReadBaseFPMsgToFile(
int iPort,
char * pcCHMsgFileName,
unsigned int * puiCHMsgFileLen,
char * pcPHMsgFileName,
unsigned int * puiPHMsgFileLen,
char * pcFPMsgFileName,
unsigned int * puiFPMsgFileLen,
int iIfOpen
);
int _stdcall Syn_ReadNewAppMsg(int iPort , unsigned char * pucAppMsg , unsigned int * puiAppMsgLen , int iIfOpen);
int _stdcall Syn_GetBmp( int iPort , char * Wlt_File );
int _stdcall Syn_ReadMsg( int iPort,int iIfOpen,IDCardData *pIDCardData );
int _stdcall Syn_ReadFPMsg( int iPort,int iIfOpen,IDCardData *pIDCardData,char * cFPhotoname );
int _stdcall Syn_FindReader();
int _stdcall Syn_FindUSBReader();
int _stdcall Syn_BmpToJpeg( char * cBmpName , char * cJpegName);
int _stdcall Syn_PhotoToStrBase64(char * cBase64,int * iLen, char *cPhotoName);
int _stdcall Syn_StrBase64ToPhoto(char * cBase64,int iLen,char *cPhotoName);
//////////////////////////////////////////////////////////////////////////
// 设置附加功能函数
//
//////////////////////////////////////////////////////////////////////////
int _stdcall Syn_SetPhotoPath( int iOption , char * cPhotoPath );
int _stdcall Syn_SetPhotoType( int iType );
int _stdcall Syn_SetPhotoName( int iType );
int _stdcall Syn_SetPhotoNameEx( int iType ,char * cPhotoname);
int _stdcall Syn_SetSexType( int iType );
int _stdcall Syn_SetNationType( int iType );
int _stdcall Syn_SetBornType( int iType );
int _stdcall Syn_SetUserLifeBType( int iType );
int _stdcall Syn_SetUserLifeEType( int iType ,int iOption);
//////////////////////////////////////////////////////////////////////////
// USBHID函数
//
//////////////////////////////////////////////////////////////////////////
int _stdcall Syn_USBHIDM1Reset( int iPort, DWORD * pdwCardSN, unsigned char * pbSize );
int _stdcall Syn_USBHIDM1AuthenKey( int iPort, unsigned char KeyType, unsigned char BlockNo, unsigned char * pKey);
int _stdcall Syn_USBHIDM1ReadBlock( int iPort, unsigned char BlockNo, unsigned char * pBlock );
int _stdcall Syn_USBHIDM1WriteBlock( int iPort, unsigned char BlockNo, unsigned char * pBlock );
int _stdcall Syn_USBHIDM1Halt( int iPort );
int _stdcall Syn_USBHIDReadFactoryInfo(
int iPort ,
unsigned char * pFactory,
unsigned char * pVol,
unsigned char * pSerialNo,
unsigned char * pReserved);
int _stdcall Syn_USBHIDReadUserInfo( int iPort,unsigned char *pInfo);
int _stdcall Syn_USBHIDWriteUserInfo( int iPort,unsigned char *pInfo);
int _stdcall Syn_USBHIDGetMaxByte( int iPort,unsigned char *pSAMMaxByte , unsigned char *pARMVol);
int _stdcall Syn_USBHIDSendSound( int iPort, unsigned char ucSound);
//////////////////////////////////////////////////////////////////////////
// USBReade.dll USBHID函数
//
//////////////////////////////////////////////////////////////////////////
int _stdcall Syn_USBOpenPort( int iPort );
int _stdcall Syn_USBClosePort( int iPort );
int _stdcall Syn_USBSetMaxRFByte ( int iPort, unsigned char ucByte,int bIfOpen );
int _stdcall Syn_USBStartFindIDCard ( int iPort , unsigned char * pucIIN, int iIfOpen );
int _stdcall Syn_USBSelectIDCard ( int iPort , unsigned char * pucSN, int iIfOpen );
int _stdcall Syn_USBReadBaseMsg (
int iPort ,
unsigned char * pucCHMsg ,
unsigned int * puiCHMsgLen ,
unsigned char * pucPHMsg ,
unsigned int * puiPHMsgLen ,
int iIfOpen);
int _stdcall Syn_USBReadBaseFPMsg(
int iPort,
unsigned char * pucCHMsg,
unsigned int * puiCHMsgLen,
unsigned char * pucPHMsg,
unsigned int * puiPHMsgLen,
unsigned char * pucFPMsg,
unsigned int * puiFPMsgLen,
int iIfOpen
);
int _stdcall Syn_USBReadNewAppMsg(int iPort , unsigned char * pucAppMsg , unsigned int * puiAppMsgLen , int iIfOpen);
int _stdcall Syn_USBGetSAMID ( int iPort, unsigned char * pucSAMID, int iIfOpen );
int _stdcall Syn_USBGetSAMIDToStr ( int iPort, char * pcSAMID, int iIfOpen );
int _stdcall Syn_USBM1Reset( int iPort, DWORD * pdwCardSN, unsigned char * pbSize );
int _stdcall Syn_USBM1AuthenKey( int iPort, unsigned char KeyType, unsigned char BlockNo, unsigned char * pKey);
int _stdcall Syn_USBM1ReadBlock( int iPort, unsigned char BlockNo, unsigned char * pBlock );
int _stdcall Syn_USBM1WriteBlock( int iPort, unsigned char BlockNo, unsigned char * pBlock );
int _stdcall Syn_USBM1Halt( int iPort );
int _stdcall Syn_USBReadFactoryInfo(
int iPort ,
unsigned char * pFactory,
unsigned char * pVol,
unsigned char * pSerialNo,
unsigned char * pReserved);
int _stdcall Syn_USBWriteFactoryInfo(
int iPort,
unsigned char * pFactory,
unsigned char * pVol,
unsigned char * pSerialNo,
unsigned char * pReserved);
int _stdcall Syn_USBReadUserInfo( int iPort,unsigned char *pInfo);
int _stdcall Syn_USBWriteUserInfo( int iPort,unsigned char *pInfo);
int _stdcall Syn_USBGetMaxByte( int iPort,unsigned char *pSAMMaxByte , unsigned char *pARMVol);
int _stdcall Syn_USBSendSound( int iPort, unsigned char ucSound);
}