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.

131 lines
2.8 KiB

  1. /***************************************************************************
  2. Copyright (c) 2002 Microsoft Corporation
  3. Module Name:
  4. SCPRIV.H
  5. Abstract:
  6. Private interface for Smartcard Driver Utility Library
  7. Environment:
  8. Kernel Mode Only
  9. Notes:
  10. THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  11. KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  12. IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  13. PURPOSE.
  14. Copyright (c) 2001 Microsoft Corporation. All Rights Reserved.
  15. Revision History:
  16. 05/14/2002 : created
  17. Authors:
  18. Randy Aull
  19. ****************************************************************************/
  20. #ifndef __SCPRIV_H__
  21. #define __SCPRIV_H__
  22. typedef ULONG QUEUE_STATE;
  23. #define PASS_IOCTLS 1
  24. #define QUEUE_IOCTLS 2
  25. #define FAIL_IOCTLS 3
  26. #define INVALID_STATE 0xff
  27. #define SMARTCARD_POOL_TAG 'TUCS'
  28. typedef enum _PNPSTATE {
  29. DEVICE_STATE_INITIALIZED = 1,
  30. DEVICE_STATE_STARTING,
  31. DEVICE_STATE_START_SUCCESS,
  32. DEVICE_STATE_START_FAILURE,
  33. DEVICE_STATE_STOPPING,
  34. DEVICE_STATE_STOPPED,
  35. DEVICE_STATE_SUPRISE_REMOVING,
  36. DEVICE_STATE_REMOVING,
  37. DEVICE_STATE_REMOVED
  38. } PNPSTATE;
  39. typedef struct _SCUTIL_EXTENSION {
  40. PDEVICE_OBJECT LowerDeviceObject;
  41. PDEVICE_OBJECT PhysicalDeviceObject;
  42. PSMARTCARD_EXTENSION SmartcardExtension;
  43. ULONG ReaderOpen;
  44. IRP_LIST PendingIrpQueue;
  45. QUEUE_STATE IoctlQueueState;
  46. ULONG IoCount;
  47. PIO_REMOVE_LOCK RemoveLock;
  48. DEVICE_CAPABILITIES DeviceCapabilities;
  49. UNICODE_STRING DeviceName;
  50. PNP_CALLBACK StartDevice;
  51. PNP_CALLBACK StopDevice;
  52. PNP_CALLBACK RemoveDevice;
  53. PNP_CALLBACK FreeResources;
  54. POWER_CALLBACK SetPowerState;
  55. KEVENT OkToStop;
  56. ULONG RestartIoctls;
  57. PNPSTATE PnPState;
  58. PNPSTATE PrevState;
  59. DEVICE_POWER_STATE PowerState;
  60. } SCUTIL_EXTENSION, *PSCUTIL_EXTENSION;
  61. VOID
  62. StartIoctls(
  63. PSCUTIL_EXTENSION pExt
  64. );
  65. VOID
  66. StopIoctls(
  67. PSCUTIL_EXTENSION pExt
  68. );
  69. VOID
  70. FailIoctls(
  71. PSCUTIL_EXTENSION pExt
  72. );
  73. QUEUE_STATE
  74. GetIoctlQueueState(
  75. PSCUTIL_EXTENSION pExt
  76. );
  77. VOID
  78. IncIoCount(
  79. PSCUTIL_EXTENSION pExt
  80. );
  81. VOID
  82. DecIoCount(
  83. PSCUTIL_EXTENSION pExt
  84. );
  85. #endif // __SCPRIV_H__