Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
2.5 KiB

  1. /*++
  2. Copyright (C) Microsoft Corporation, 1998 - 1999
  3. Module Name:
  4. ScUIDlg
  5. Abstract:
  6. This header file provides the definitions and symbols necessary for an
  7. Application or Smart Card Service Provider to use the Microsoft Smart
  8. Card dialogs.
  9. Author:
  10. Amanda Matlosz (amatlosz) 06/11/1998
  11. Environment:
  12. Win32
  13. Notes:
  14. This will be added to winscard.h.
  15. --*/
  16. #ifndef _SCUIDLG_H_
  17. #define _SCUIDLG_H_
  18. #include <winscard.h>
  19. //
  20. // SCardUIDlgGetPIN
  21. //
  22. /*
  23. GetPIN dialog contains: large icon-sized bitmap for brand name
  24. standard prompt (caller can't change)
  25. checkbox for "Change PIN" (like Schlumberger CSP's)
  26. OnOK() calls lpfnVerifyPIN, raises some error message for
  27. "BAD_PIN" and "CARD_LOCKED"
  28. lpfnVerifyPIN returns a code meaning "OK" "TRY_AGAIN" "CARD_LOCKED"
  29. returns standard dialog codes: IDOK, IDCANCEL, or ID_ABORT
  30. */
  31. typedef LONG (WINAPI *LPVERIFYPINPROC) (IN LPSTR, IN PVOID);
  32. typedef struct {
  33. DWORD dwStructSize; // REQUIRED
  34. HWND hwndOwner; // OPTIONAL
  35. HBITMAP hBitmap; // OPTIONAL 32x32 bmp for your brand insignia
  36. DWORD dwFlags; // OPTIONAL only SC_DLG_NOCHANGEPIN currently defined
  37. BOOL fChangePin; // OUT user checked change pin checkbox
  38. LPVERIFYPINPROC lpfnVerifyPIN; // REQUIRED
  39. } PINPROMPT, *PPINPROMPT, *LPPINPROMPT;
  40. extern WINSCARDAPI LONG WINAPI
  41. SCardUIDlgGetPIN(
  42. LPPINPROMPT);
  43. //
  44. // SCardUIDlgChangePIN
  45. //
  46. /*
  47. ChangePIN dialog contains: large icon-sized bitmap for brand name
  48. Some Standard Prompt,
  49. boxes for old pin, new pin, and confirm new pin
  50. lpfnChangePIN takes szOldPIN, szNewPIN, and pvUserData;
  51. returns a code "OK" "BAD_PIN" (incorrect old pin) "CARD LOCKED" "INVALID_PIN" (new pin is not long enough, etc.)
  52. // TODO: should lpfnChangePIN respond with exact error messages re: invalid (new) pin,
  53. // TODO: like "too short, too long, min length is:X, max length is:X, used invalid characters" etc.???
  54. // TODO: should caller have option of returning an error message to be displayed? (localization issues?)
  55. returns standard dialog codes: IDOK, IDCANCEL, or ID_ABORT
  56. */
  57. typedef LONG (WINAPI *LPCHANGEPINPROC) (IN LPSTR, IN LPSTR, IN PVOID);
  58. typedef struct {
  59. DWORD dwStructSize; // REQUIRED
  60. HWND hwndOwner; // OPTIONAL
  61. HBITMAP hBitmap; // OPTIONAL 32x32 bmp for your brand insignia
  62. LPCHANGEPINPROC lpfnChangePIN; // REQUIRED
  63. } CHANGEPIN, *PCHANGEPIN, *LPCHANGEPIN;
  64. extern WINSCARDAPI LONG WINAPI
  65. SCardUIDLgChangePIN(
  66. LPCHANGEPIN);
  67. #endif // _SCUIDLG_H_