Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef _FETCL_INCLUDE_H
00032 #define _FETCL_INCLUDE_H
00033
00034
00035 #if defined (_MSC_VER) || defined(__BORLANDC__) || defined(_CVI_)
00036 #ifdef FETCLDLL
00037 #define DLL_EXT_FUNC __declspec(dllexport) __stdcall
00038 #else
00039 #define DLL_EXT_FUNC __declspec(dllimport) __stdcall
00040 #endif
00041 #define FETCL_EXT_CALL __stdcall
00042 #define FETCL_CALL __cdecl
00043 #else
00044 #define FETCL_EXT_CALL
00045 #define DLL_EXT_FUNC
00046 #define FETCL_CALL
00047 #endif
00048
00049
00050 #ifdef __cplusplus
00051 extern "C" {
00052 #endif
00053
00054
00055 #define LANGUAGE 9
00056
00057
00058
00059
00060
00061
00062 #define FETCL_ERR_NEW_TRANSPONDER_FAILURE -4200
00063 #define FETCL_ERR_EMPTY_LIST -4201
00064 #define FETCL_ERR_POINTER_IS_NULL -4202
00065 #define FETCL_ERR_NO_MORE_MEM -4203
00066 #define FETCL_ERR_UNKNOWN_COMM_PORT -4204
00067 #define FETCL_ERR_UNSUPPORTED_FUNCTION -4205
00068 #define FETCL_ERR_NO_USB_SUPPORT -4206
00069 #define FETCL_ERR_OLD_FECOM -4207
00070 #define FETCL_ERR_FILE_COULD_NOT_BE_OPENED -4208
00071 #define FETCL_ERR_APDU_CURRENTLY_RUNNING -4209
00072
00073
00074 #define FETCL_ERR_NO_VALUE -4210
00075
00076
00077 #define FETCL_ERR_UNKNOWN_HND -4220
00078 #define FETCL_ERR_HND_IS_NULL -4221
00079 #define FETCL_ERR_HND_IS_NEGATIVE -4222
00080 #define FETCL_ERR_NO_HND_FOUND -4223
00081 #define FETCL_ERR_TRANSPONDER_HND_IS_NEGATIVE -4224
00082 #define FETCL_ERR_HND_UNVALID -4225
00083 #define FETCL_ERR_READER_HND_IS_NEGATIVE -4226
00084 #define FETCL_ERR_THREAD_NOT_CREATED -4227
00085
00086
00087 #define FETCL_ERR_UNKNOWN_PARAMETER -4250
00088 #define FETCL_ERR_PARAMETER_OUT_OF_RANGE -4251
00089 #define FETCL_ERR_ODD_PARAMETERSTRING -4252
00090 #define FETCL_ERR_UNKNOWN_ERRORCODE -4253
00091 #define FETCL_ERR_UNDERSIZED_RESPONSE_BUFFER -4257 // Responsebuffer < 64kB
00092
00093
00094 #define FETCL_ERR_BUFFER_OVERFLOW -4270
00095 #define FETCL_ERR_OVERSIZED_RESPONSE -4271 // Response > 64kB
00096 #define FETCL_INVALID_ACKNOWLEDGEMENT -4272
00097 #define FETCL_INVALID_ACKNOWLEDGEMENT_LENGTH -4273
00098 #define FETCL_LIST_COMPLETE_FAILURE -4274 // Liste sollte komplett sein.
00099 #define FETCL_INCOMPLETE_RESPONSE -4275 // Response zurueck, aber nicht komplett. // gab aber was anderes
00100 #define FETCL_INVALID_PROTOCOL -4276
00101 #define FETCL_INVALID_TRANSMISSION -4277
00102
00103
00104
00105
00106
00107 #define FETCL_THREAD_ID 1
00108 #define FETCL_WND_HWND 2
00109 #define FETCL_CALLBACK 3
00110 #define FETCL_CALLBACK2 4
00111 #define FETCL_TASKCB_NET_1 10
00112
00113
00114
00115
00116
00117
00118
00119 typedef struct _FETCL_EVENT_INIT
00120 {
00121
00122 void* pAny;
00123
00124 unsigned int uiUse;
00125 unsigned int uiMsg;
00126 unsigned int uiFlag;
00127 union
00128 {
00129 #if defined(_MSC_VER) || defined(__BORLANDC__)
00130 DWORD dwThreadID;
00131 HWND hwndWnd;
00132 #endif
00133 void (FETCL_CALL* cbFct)(int, int, int);
00134 void (FETCL_CALL* cbFct2)(void*, int, int, int);
00135
00136 #if defined(_MSC_VER)
00137
00138 void (CALLBACK* cbFctNET1)( int iHandle,
00139 int iError,
00140 int iRspLen );
00141
00142 #endif
00143 #ifdef __cplusplus
00144 };
00145 #else
00146 }Method;
00147 #endif
00148
00149 } FETCL_EVENT_INIT;
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162 void DLL_EXT_FUNC FETCL_GetDLLVersion( char* cVersion );
00163
00164 int DLL_EXT_FUNC FETCL_GetErrorText( int iErrorCode, char* cErrorText );
00165
00166 int DLL_EXT_FUNC FETCL_GetLastError( int* iErrorCode, char* cErrorText );
00167
00168
00169
00170
00171
00172
00173
00174 int DLL_EXT_FUNC FETCL_NewTransponder( int iReaderHnd,
00175 unsigned char ucBusAdr,
00176 unsigned char ucCid,
00177 unsigned char ucNad,
00178 bool bUseCid,
00179 bool bUseNad );
00180
00181 int DLL_EXT_FUNC FETCL_DeleteTransponder( int iTransponderHnd );
00182
00183 int DLL_EXT_FUNC FETCL_GetTransponderList( int iNext );
00184
00185
00186
00187
00188
00189 int DLL_EXT_FUNC FETCL_Apdu( int iTransponderHnd,
00190 unsigned char* ucData,
00191 int iDataLen,
00192 FETCL_EVENT_INIT* pInit );
00193
00194 int DLL_EXT_FUNC FETCL_Deselect( int iTransponderHnd );
00195
00196 int DLL_EXT_FUNC FETCL_Ping( int iTransponderHnd );
00197
00198 int DLL_EXT_FUNC FETCL_GetResponseData( int iTransponderHnd,
00199 unsigned char* ucData,
00200 int iDataBufLen );
00201
00202
00203 #undef DLL_EXT_FUNC
00204
00205 #ifdef __cplusplus
00206 }
00207 #endif
00208
00209
00210 #endif // _FETCL_INCLUDE_H