1 #ifndef __EXTERNALPINUI_H__ 2 #define __EXTERNALPINUI_H__ 3 typedef enum _CARD_STATES 4 { 5 CS_PINENTRY = 0, 6 CS_PINCANCEL = 1, 7 CS_PINTIMEOUT = 2, 8 CS_PINFAILED = 3, 9 CS_PINVERIFIED = 4, 10 CS_PINENTERED = 5 11 } CARD_STATE; 12 13 typedef enum _UI_STATE 14 { 15 US_PINENTRY = 0, 16 US_PINCANCEL = 1 17 } UI_STATE; 18 19 20 //struct to communicate between logic an UI 21 typedef struct _EXTERNAL_PIN_INFORMATION 22 { 23 SCARDHANDLE hCardHandle; 24 FEATURES features; 25 CARD_STATE cardState; 26 UI_STATE uiState; 27 int iPinCharacters; 28 HWND hwndParentWindow; 29 wchar_t lpstrPinContextString[256]; 30 } EXTERNAL_PIN_INFORMATION, *PEXTERNAL_PIN_INFORMATION; 31 32 typedef enum _LOCALIZATION_STRINGS 33 { 34 CANCEL_MAININSTRUCTIONS, 35 CANCEL_CONTENT, 36 WINDOW_TITLE, 37 ENTER_PIN_MAININSTRUCTIONS, 38 ENTER_PIN_CONTENT, 39 PIN_TOO_SHORT_MAININSTRUCTIONS, 40 PIN_TOO_SHORT_CONTENT, 41 PIN_TIMED_OUT_MAININSTRUCTIONS, 42 PIN_TIMED_OUT_CONTENT, 43 PIN_CANCELLED_MAININSTRUCTIONS, 44 PIN_CANCELLED_CONTENT, 45 PIN_DO_NOT_MATCH_MAININSTRUCTIONS, 46 PIN_DO_NOT_MATCH_CONTENT, 47 PIN_TOO_LONG_MAININSTRUCTIONS, 48 PIN_TOO_LONG_CONTENT, 49 PIN_SIZE_MAININSTRUCTIONS, 50 PIN_SIZE_CONTENT, 51 PIN_UNKNOWN_MAININSTRUCTIONS, 52 PIN_UNKNOWN_CONTENT, 53 PIN_INVALID_MAININSTRUCTIONS, 54 PIN_INVALID_CONTENT, 55 PIN_BLOCKED_MAININSTRUCTIONS, 56 PIN_BLOCKED_CONTENT, 57 MAX_LOCALIZATION_STRINGS 58 } LOCALIZATION_STRINGS; 59 60 typedef enum _LANGUAGES 61 { 62 en, 63 nl, 64 fr, 65 de, 66 MAX_LANGUAGES 67 } LANGUAGES; 68 69 HRESULT CALLBACK TaskDialogCallbackProcPinEntry 70 ( 71 HWND hwnd, 72 UINT uNotification, 73 WPARAM wParam, 74 LPARAM lParam, 75 LONG_PTR dwRefData 76 ) 77 ; 78 79 DWORD WINAPI DialogThreadPinEntry 80 ( 81 LPVOID lpParam 82 ) 83 ; 84 LANGUAGES getLanguage(); 85 USHORT getLangID(); 86 87 // translations for UI 88 static wchar_t * t[MAX_LOCALIZATION_STRINGS][MAX_LANGUAGES] = 89 { 90 // CANCEL_MAININSTRUCTIONS 91 { 92 // en 93 L"Press cancel on the PIN pad", 94 // nl 95 L"Druk op Cancel op het PIN pad", 96 // fr 97 L"Appuyez sur Annuler sur le clavier PIN", 98 // de 99 L"Drücken Sie auf dem PIN-Pad auf Cancel (Abbruch)" 100 }, 101 // CANCEL_CONTENT 102 { 103 // en 104 L"To cancel the operation, press the Cancel button on the PIN pad.", 105 // nl 106 L"Om de operatie te annuleren, druk op Cancel op het PIN pad.", 107 // fr 108 L"Pour annuler l�op�ration, appuyez sur Annuler sur le clavier PIN.", 109 // de 110 L"Um den Vorgang abzubrechen, drücken Sie auf dem PIN-Pad die Taste Cancel." 111 }, 112 // WINDOW_TITLE 113 { 114 // en 115 L"External PIN pad entry", 116 // nl 117 L"Extern PIN pad", 118 // fr 119 L"Clavier PIN externe", 120 // de 121 L"Eingabe über externes PIN-Pad" 122 }, 123 // ENTER_PIN_MAININSTRUCTIONS 124 { 125 // en 126 L"Enter your PIN code on the PIN pad", 127 // nl 128 L"Tik uw PIN code in op het PIN pad", 129 // fr 130 L"Ins�rez votre code PIN sur le clavier PIN", 131 // de 132 L"Geben Sie Ihren PIN-Code auf dem PIN-Pad ein" 133 }, 134 // ENTER_PIN_CONTENT 135 { 136 // en 137 L"Confirm your PIN with the OK button on the external PIN pad.", 138 // nl 139 L"Bevestig uw PIN met de OK knop op het externe PIN pad.", 140 // fr 141 L"Confirmez votre code PIN avec le bouton OK du clavier PIN externe.", 142 // de 143 L"Bestätigen Sie Ihre PIN mit der Taste OK auf dem externen PIN-Pad." 144 }, 145 // PIN_TOO_SHORT_MAININSTRUCTIONS 146 { 147 // en 148 L"PIN too short", 149 // nl 150 L"PIN is te kort", 151 // fr 152 L"Code PIN trop court", 153 // de 154 L"PIN zu kurz" 155 }, 156 // PIN_TOO_SHORT_CONTENT 157 { 158 // en 159 L"The PIN you entered is too short. Please enter at least 4 numbers.", 160 // nl 161 L"De PIN is te kort. Gelieve minimum 4 cijfers in te tikken.", 162 // fr 163 L"Le code PIN est trop court. Veuillez ins�rer au minimum 4 chiffres.", 164 // de 165 L"Die von Ihnen eingegebene PIN ist zu kurz. Bitte mindestens vier Ziffern eingeben." 166 }, 167 // PIN_TIMED_OUT_MAININSTRUCTIONS 168 { 169 // en 170 L"PIN entry timed out", 171 // nl 172 L"Wachttijd is verlopen", 173 // fr 174 L"Le temps d�introduction du code PIN est d�pass�", 175 // de 176 L"Zeit für PIN-Eingabe abgelaufen" 177 }, 178 // PIN_TIMED_OUT_CONTENT 179 { 180 // en 181 L"On the PIN pad, push OK to confirm the PIN.", 182 // nl 183 L"Bevestig uw PIN met OK op het PIN pad.", 184 // fr 185 L"Confirmez votre PIN en tapant OK sur le clavier PIN.", 186 // de 187 L"Drücken Sie auf dem PIN-Pad auf OK, um die PIN zu bestätigen." 188 }, 189 // PIN_CANCELLED_MAININSTRUCTIONS 190 { 191 // en 192 L"PIN entry cancelled", 193 // nl 194 L"PIN operatie geannuleerd", 195 // fr 196 L"Op�ration PIN annul�e", 197 // de 198 L"PIN-Eingabe abgebrochen" 199 }, 200 // PIN_CANCELLED_CONTENT 201 { 202 // en 203 L"You pushed the Cancel button.", 204 // nl 205 L"U drukte op de Cancel knop", 206 // fr 207 L"Vous avez appuy� sur la touche Annuler", 208 // de 209 L"Sie haben die Taste Cancel gedrückt" 210 }, 211 // PIN_DO_NOT_MATCH_MAININSTRUCTIONS 212 { 213 // en 214 L"New PINs do not match", 215 // nl 216 L"De nieuwe PINs komen niet overeen", 217 // fr 218 L"Les nouveaux codes PIN ne conviennent pas", 219 // de 220 L"Neue PINs stimmen nicht überein" 221 }, 222 // PIN_DO_NOT_MATCH_CONTENT 223 { 224 // en 225 L"Modify PIN failed because two new PIN entries do not match", 226 // nl 227 L"PIN wijzigen is mislukt omdat de nieuwe PINs niet overeenkomen", 228 // fr 229 L"La modification du code PIN a �chou� car les nouveaux codes PIN ne conviennent pas", 230 // de 231 L"PIN ändern nicht erfolgreich, da zwei neue PIN-Eingaben nicht übereinstimmen" 232 }, 233 // PIN_TOO_LONG_MAININSTRUCTIONS 234 { 235 // en 236 L"PIN too long", 237 // nl 238 L"PIN is te lang", 239 // fr 240 L"Code PIN trop long", 241 // de 242 L"PIN zu lang" 243 }, 244 // PIN_TOO_LONG_CONTENT 245 { 246 // en 247 L"The PIN you entered was too long. Please enter not more than 12 numbers.", 248 // nl 249 L"De PIN is te lang. Gelieve maximum 12 cijfers in te tikken.", 250 // fr 251 L"Le code PIN est trop long. Veuillez ins�rer au maximum 12 chiffres.", 252 // de 253 L"Die von Ihnen eingegebene PIN ist zu lang. Bitte nicht mehr als 12 Ziffern eingeben." 254 }, 255 // PIN_SIZE_MAININSTRUCTIONS 256 { 257 // en 258 L"PIN entry failed", 259 // nl 260 L"Verkeerde PIN lengte", 261 // fr 262 L"Le code PIN a une longueur inappropri�e", 263 // de 264 L"PIN-Eingabe gescheitert" 265 }, 266 // PIN_SIZE_CONTENT 267 { 268 // en 269 L"The PIN you entered is too short or too long. Please enter at least 4 numbers and not more than 12 numbers.", 270 // nl 271 L"De PIN is te kort of te lang. De PIN moet tussen 4 en 12 cijfers lang zijn.", 272 // fr 273 L"Le code PIN est soit trop court soit trop long. Il doit comprendre entre 4 et 12 chiffres.", 274 // de 275 L"Die von Ihnen eingegebene PIN ist zu kurz oder zu lang. Bitte mindestens 4 und höchstens 12 Ziffern eingeben." 276 }, 277 // PIN_UNKNOWN_MAININSTRUCTIONS 278 { 279 // en 280 L"Unknown error", 281 // nl 282 L"Onbekende fout", 283 // fr 284 L"Erreur inconnue", 285 // de 286 L"Unbekannter Fehler" 287 }, 288 // PIN_UNKNOWN_CONTENT 289 { 290 // en 291 L"Unknown return value %x %x.", 292 // nl 293 L"Onbekende waarde: %x %x.", 294 // fr 295 L"Valeur inconnue: %x %x.", 296 // de 297 L"Unbekannter Rückgabewert: %x %x." 298 }, 299 // PIN_INVALID_MAININSTRUCTIONS 300 { 301 // en 302 L"Invalid PIN", 303 // nl 304 L"Foute PIN", 305 // fr 306 L"Code PIN incorrect", 307 // de 308 L"Ungültige PIN" 309 }, 310 // PIN_INVALID_CONTENT 311 { 312 // en 313 L"The PIN you entered is invalid. Retries left: %d", 314 // nl 315 L"De PIN die u ingaf is fout. Pogingen over: %d", 316 // fr 317 L"Le code PIN que vous avez introduit est erron�. Il vous reste %d essais", 318 // de 319 L"Die von Ihnen eingegebene PIN ist ungültig. Sie haben noch %d weitere Versuche." 320 }, 321 // PIN_BLOCKED_MAININSTRUCTIONS 322 { 323 // en 324 L"PIN entry failed", 325 // nl 326 L"PIN geblokkeerd", 327 // fr 328 L"PIN bloqu�", 329 // de 330 L"PIN-Eingabe gescheitert" 331 }, 332 // PIN_BLOCKED_CONTENT 333 { 334 // en 335 L"PIN blocked!", 336 // nl 337 L"De PIN is geblokkeerd", 338 // fr 339 L"Le code PIN a �t� bloqu�", 340 // de 341 L"PIN gesperrt!" 342 } 343 }; 344 345 #endif 346