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.

122 lines
2.4 KiB

  1. /***************************************************************************
  2. Copyright (c) 2002 Microsoft Corporation
  3. Module Name:
  4. SCUTIL.H
  5. Abstract:
  6. Public 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 __SCUTIL_H__
  21. #define __SCUTIL_H__
  22. typedef NTSTATUS (*PNP_CALLBACK)(PDEVICE_OBJECT DeviceObject,
  23. PIRP Irp);
  24. typedef NTSTATUS (*POWER_CALLBACK)(PDEVICE_OBJECT DeviceObject,
  25. DEVICE_POWER_STATE DeviceState,
  26. PBOOLEAN PostWaitWake);
  27. typedef PVOID SCUTIL_HANDLE;
  28. NTSTATUS
  29. ScUtil_Initialize(
  30. SCUTIL_HANDLE UtilHandle,
  31. PDEVICE_OBJECT PhysicalDeviceObject,
  32. PDEVICE_OBJECT LowerDeviceObject,
  33. PSMARTCARD_EXTENSION SmartcardExtension,
  34. PIO_REMOVE_LOCK RemoveLock,
  35. PNP_CALLBACK StartDevice,
  36. PNP_CALLBACK StopDevice,
  37. PNP_CALLBACK RemoveDevice,
  38. PNP_CALLBACK FreeResources,
  39. POWER_CALLBACK SetPowerState
  40. );
  41. NTSTATUS
  42. ScUtil_DeviceIOControl(
  43. PDEVICE_OBJECT DeviceObject,
  44. PIRP Irp
  45. );
  46. NTSTATUS
  47. ScUtil_PnP(
  48. PDEVICE_OBJECT DeviceObject,
  49. PIRP Irp
  50. );
  51. NTSTATUS
  52. ScUtil_Power(
  53. PDEVICE_OBJECT DeviceObject,
  54. PIRP Irp
  55. );
  56. NTSTATUS
  57. ScUtil_Cleanup(
  58. PDEVICE_OBJECT DeviceObject,
  59. PIRP Irp
  60. );
  61. NTSTATUS
  62. ScUtil_UnloadDriver(
  63. PDRIVER_OBJECT DriverObject
  64. );
  65. NTSTATUS
  66. ScUtil_CreateClose(
  67. PDEVICE_OBJECT DeviceObject,
  68. PIRP Irp
  69. );
  70. NTSTATUS
  71. ScUtil_SystemControl(
  72. PDEVICE_OBJECT DeviceObject,
  73. PIRP Irp
  74. );
  75. NTSTATUS
  76. ScUtil_ForwardAndWait(
  77. PDEVICE_OBJECT DeviceObject,
  78. PIRP Irp
  79. );
  80. NTSTATUS
  81. ScUtil_Cancel(
  82. PDEVICE_OBJECT DeviceObject,
  83. PIRP Irp
  84. );
  85. #endif // __SCUTIL_H__