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.

113 lines
4.9 KiB

  1. // Gemplus (C) 1999
  2. // Version 1.0
  3. // Author: Sergey Ivanov
  4. // Date of creation - 18.05.1999
  5. // Change log:
  6. //
  7. #ifndef SYS_INT
  8. #define SYS_INT
  9. #include "generic.h"
  10. #pragma PAGEDCODE
  11. // This is device interface to system...
  12. class CSystem
  13. {
  14. public:
  15. NTSTATUS m_Status;
  16. SAFE_DESTRUCTORS();
  17. virtual VOID dispose(){self_delete();};
  18. protected:
  19. CSystem(){};
  20. virtual ~CSystem(){};
  21. public:
  22. // This object will implement next interfaces...
  23. virtual NTSTATUS createDevice(PDRIVER_OBJECT DriverObject,
  24. ULONG DeviceExtensionSize,
  25. PUNICODE_STRING DeviceName OPTIONAL,
  26. DEVICE_TYPE DeviceType,
  27. ULONG DeviceCharacteristics,
  28. BOOLEAN Reserved,
  29. PDEVICE_OBJECT *DeviceObject) {return STATUS_SUCCESS;};
  30. virtual VOID deleteDevice(PDEVICE_OBJECT DeviceObject) {};
  31. virtual PDEVICE_OBJECT attachDevice(PDEVICE_OBJECT FuncDevice,IN PDEVICE_OBJECT PhysDevice) {return NULL;};
  32. virtual VOID detachDevice(PDEVICE_OBJECT TargetDevice) {};
  33. virtual NTSTATUS callDriver(PDEVICE_OBJECT DeviceObject,PIRP Irp) {return STATUS_SUCCESS;};
  34. virtual NTSTATUS registerDeviceInterface(PDEVICE_OBJECT PhysicalDeviceObject,
  35. CONST GUID *InterfaceClassGuid,
  36. PUNICODE_STRING ReferenceString, OPTIONAL
  37. PUNICODE_STRING SymbolicLinkName) {return STATUS_SUCCESS;};
  38. virtual NTSTATUS setDeviceInterfaceState(PUNICODE_STRING SymbolicLinkName,BOOLEAN Enable) {return STATUS_SUCCESS;};
  39. virtual NTSTATUS createSystemThread(OUT PHANDLE ThreadHandle,
  40. IN ULONG DesiredAccess,
  41. IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
  42. IN HANDLE ProcessHandle OPTIONAL,
  43. OUT PCLIENT_ID ClientId OPTIONAL,
  44. IN PKSTART_ROUTINE StartRoutine,
  45. IN PVOID StartContext) {return STATUS_SUCCESS;};
  46. virtual NTSTATUS terminateSystemThread(IN NTSTATUS ExitStatus) {return STATUS_SUCCESS;};
  47. virtual NTSTATUS referenceObjectByHandle(IN HANDLE Handle,
  48. IN ACCESS_MASK DesiredAccess,
  49. IN POBJECT_TYPE ObjectType OPTIONAL,
  50. IN KPROCESSOR_MODE AccessMode,
  51. OUT PVOID *Object,
  52. OUT POBJECT_HANDLE_INFORMATION HandleInformation OPTIONAL
  53. ) {return STATUS_SUCCESS;};
  54. virtual VOID referenceObject(IN PVOID Object) {};
  55. virtual VOID dereferenceObject(IN PVOID Object) {};
  56. virtual PDEVICE_OBJECT getAttachedDeviceReference(IN PDEVICE_OBJECT DeviceObject) {return NULL;};
  57. virtual NTSTATUS ZwClose(IN HANDLE Handle) {return STATUS_SUCCESS;};
  58. virtual NTSTATUS createSymbolicLink(IN PUNICODE_STRING SymbolicLinkName,IN PUNICODE_STRING DeviceName) {return STATUS_SUCCESS;};
  59. virtual NTSTATUS deleteSymbolicLink(IN PUNICODE_STRING SymbolicLinkName) {return STATUS_SUCCESS;};
  60. virtual VOID invalidateDeviceRelations(IN PDEVICE_OBJECT DeviceObject,IN DEVICE_RELATION_TYPE Type) {};
  61. virtual NTSTATUS getDeviceObjectPointer(IN PUNICODE_STRING ObjectName,
  62. IN ACCESS_MASK DesiredAccess,
  63. OUT PFILE_OBJECT *FileObject,
  64. OUT PDEVICE_OBJECT *DeviceObject) {return STATUS_SUCCESS;};
  65. virtual VOID raiseIrql(IN KIRQL NewIrql,OUT KIRQL* oldIrql) = 0;
  66. virtual VOID lowerIrql (IN KIRQL NewIrql) = 0;
  67. virtual KIRQL getCurrentIrql()=0;
  68. virtual VOID initializeDeviceQueue(IN PKDEVICE_QUEUE DeviceQueue) = 0;
  69. virtual BOOLEAN insertDeviceQueue(IN PKDEVICE_QUEUE DeviceQueue,IN PKDEVICE_QUEUE_ENTRY DeviceQueueEntry) = 0;
  70. virtual BOOLEAN insertByKeyDeviceQueue(IN PKDEVICE_QUEUE DeviceQueue,IN PKDEVICE_QUEUE_ENTRY DeviceQueueEntry,IN ULONG SortKey) = 0;
  71. virtual PKDEVICE_QUEUE_ENTRY removeDeviceQueue(IN PKDEVICE_QUEUE DeviceQueue) = 0;
  72. virtual PKDEVICE_QUEUE_ENTRY removeByKeyDeviceQueue(IN PKDEVICE_QUEUE DeviceQueue,IN ULONG SortKey) = 0;
  73. virtual BOOLEAN removeEntryDeviceQueue(IN PKDEVICE_QUEUE DeviceQueue,IN PKDEVICE_QUEUE_ENTRY DeviceQueueEntry) = 0;
  74. virtual NTSTATUS openDeviceRegistryKey(IN PDEVICE_OBJECT DeviceObject,
  75. IN ULONG DevInstKeyType,
  76. IN ACCESS_MASK DesiredAccess,
  77. OUT PHANDLE DevInstRegKey
  78. ) = 0;
  79. virtual NTSTATUS ZwQueryValueKey(IN HANDLE KeyHandle,
  80. IN PUNICODE_STRING ValueName,
  81. IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass,
  82. OUT PVOID KeyValueInformation,
  83. IN ULONG Length,
  84. OUT PULONG ResultLength) = 0;
  85. virtual NTSTATUS getDeviceProperty(IN PDEVICE_OBJECT DeviceObject,
  86. IN DEVICE_REGISTRY_PROPERTY DeviceProperty,
  87. IN ULONG BufferLength,
  88. OUT PVOID PropertyBuffer,
  89. OUT PULONG ResultLength
  90. ) = 0;
  91. virtual VOID initializeFastMutex(IN PFAST_MUTEX FastMutex) = 0;
  92. virtual VOID acquireFastMutex(IN PFAST_MUTEX FastMutex) = 0;
  93. virtual VOID releaseFastMutex(IN PFAST_MUTEX FastMutex) = 0;
  94. };
  95. #endif//SYS_INT