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.

101 lines
2.1 KiB

  1. #ifndef _BOGDANA_INSTDEV_H
  2. #define _BOGDANA_INSTDEV_H
  3. #include <nt.h>
  4. #include <ntrtl.h>
  5. #include <nturtl.h>
  6. #include <windows.h>
  7. #include <malloc.h>
  8. #include <stdio.h>
  9. #include <stdlib.h>
  10. #include <string.h>
  11. #include <wtypes.h>
  12. #include <tchar.h>
  13. #include <time.h>
  14. #include <cfgmgr32.h>
  15. #include <setupapi.h>
  16. #include <objbase.h>
  17. #include <initguid.h>
  18. #include "common.h"
  19. #include "ntlog.h"
  20. #define DEFAULT_DEVICE_NAME TEXT("GENERATE")
  21. // --------------------------------------------------------------------------------------------
  22. //
  23. // Flags for NtLog
  24. //
  25. #define PASS TLS_PASS
  26. #define FAIL TLS_SEV1
  27. #define TLS_CUSTOM 0x00008000 // unused TLS_ bit
  28. #define INFO_VARIATION TLS_INFO | TL_VARIATION
  29. #define PASS_VARIATION TLS_PASS | TL_VARIATION
  30. #define FAIL_VARIATION TLS_SEV1 | TL_VARIATION
  31. #define WARN_VARIATION TLS_WARN | TL_VARIATION
  32. #define BLOCK_VARIATION TLS_BLOCK | TL_VARIATION
  33. #define ABORT_VARIATION TLS_ABORT | TL_VARIATION
  34. #define LOG_VARIATION TLS_CUSTOM | TL_VARIATION
  35. #define LOG_OPTIONS ( TLS_REFRESH | TLS_BLOCK | TLS_SEV2 | TLS_SEV1 | TLS_WARN | \
  36. TLS_MONITOR | TLS_CUSTOM | TLS_VARIATION | \
  37. TLS_PASS | TLS_INFO | TLS_ABORT | TLS_TEST)
  38. BOOL
  39. InstallDevice (
  40. IN PTSTR DeviceName,
  41. IN PTSTR HardwareId,
  42. OUT PTSTR FinalDeviceName
  43. ) ;
  44. HANDLE
  45. OpenDriver (
  46. VOID
  47. ) ;
  48. //
  49. // Test functions
  50. //
  51. VOID
  52. TestDeviceName(
  53. HANDLE hDevice
  54. );
  55. VOID
  56. TestNullDeviceClassGuid(
  57. HANDLE hDevice
  58. );
  59. VOID
  60. TestPersistentClassGuid(
  61. HANDLE hDevice
  62. );
  63. VOID
  64. TestTemporaryClassGuid(
  65. HANDLE hDevice
  66. );
  67. VOID
  68. TestSDDLStrings(
  69. HANDLE hDevice
  70. );
  71. VOID
  72. TestSDDLsFromFile (
  73. HANDLE hDevice
  74. );
  75. VOID
  76. TestAclsSetOnClassKey (
  77. HANDLE hDevice
  78. );
  79. #endif // _BOGDANA_INSTDEV_H