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.

86 lines
1.8 KiB

  1. /*++
  2. Module Name:
  3. setupnvr.h
  4. Abstract:
  5. Access function to r/w environment variables from pseudo-NVRAM file
  6. Author:
  7. Mudit Vats (v-muditv) 5-18-99
  8. Revision History:
  9. --*/
  10. #define MAXBOOTVARS 9
  11. #define MAXBOOTVARSIZE 1024
  12. #define ERROR_OK 1
  13. #define ERROR_NOTOK 0
  14. int ReadNVRAM();
  15. int WriteNVRAM();
  16. int GetBootVar( char *szBootVar, unsigned short nLength, char *szBootVal );
  17. int SetBootVar( char *szBootVar, char *szBootVal );
  18. NTSYSAPI
  19. NTSTATUS
  20. NTAPI
  21. ZwCreateFile(
  22. OUT PHANDLE FileHandle,
  23. IN ACCESS_MASK DesiredAccess,
  24. IN POBJECT_ATTRIBUTES ObjectAttributes,
  25. OUT PIO_STATUS_BLOCK IoStatusBlock,
  26. IN PLARGE_INTEGER AllocationSize OPTIONAL,
  27. IN ULONG FileAttributes,
  28. IN ULONG ShareAccess,
  29. IN ULONG CreateDisposition,
  30. IN ULONG CreateOptions,
  31. IN PVOID EaBuffer OPTIONAL,
  32. IN ULONG EaLength
  33. );
  34. NTSYSAPI
  35. NTSTATUS
  36. NTAPI
  37. ZwQueryInformationFile(
  38. IN HANDLE FileHandle,
  39. OUT PIO_STATUS_BLOCK IoStatusBlock,
  40. OUT PVOID FileInformation,
  41. IN ULONG Length,
  42. IN FILE_INFORMATION_CLASS FileInformationClass
  43. );
  44. NTSYSAPI
  45. NTSTATUS
  46. NTAPI
  47. ZwReadFile(
  48. IN HANDLE FileHandle,
  49. IN HANDLE Event OPTIONAL,
  50. IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
  51. IN PVOID ApcContext OPTIONAL,
  52. OUT PIO_STATUS_BLOCK IoStatusBlock,
  53. OUT PVOID Buffer,
  54. IN ULONG Length,
  55. IN PLARGE_INTEGER ByteOffset OPTIONAL,
  56. IN PULONG Key OPTIONAL
  57. );
  58. NTSYSAPI
  59. NTSTATUS
  60. NTAPI
  61. ZwWriteFile(
  62. IN HANDLE FileHandle,
  63. IN HANDLE Event OPTIONAL,
  64. IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
  65. IN PVOID ApcContext OPTIONAL,
  66. OUT PIO_STATUS_BLOCK IoStatusBlock,
  67. IN PVOID Buffer,
  68. IN ULONG Length,
  69. IN PLARGE_INTEGER ByteOffset OPTIONAL,
  70. IN PULONG Key OPTIONAL
  71. );