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.

75 lines
1.6 KiB

  1. /*++
  2. Copyright (c) 1993-1994 Microsoft Corporation
  3. Module Name:
  4. initodat.h
  5. Abstract:
  6. This is the include file for the ini to data file conversion functions.
  7. Author:
  8. HonWah Chan (a-honwah) October, 1993
  9. Revision History:
  10. --*/
  11. #include <nt.h>
  12. #include <ntrtl.h>
  13. #include <nturtl.h>
  14. #include <stdlib.h>
  15. #include <windows.h>
  16. #include <strsafe.h>
  17. #include <errno.h>
  18. #include <ctype.h>
  19. #include <fcntl.h>
  20. #include <malloc.h>
  21. #include <sys\types.h>
  22. #include <sys\stat.h>
  23. #define VALUE_BUFFER_SIZE (4096 * 100)
  24. #define ALLOCMEM(x) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (DWORD)(x))
  25. #define FREEMEM(x) HeapFree(GetProcessHeap(), 0, (LPVOID)(x))
  26. typedef struct _REG_UNICODE_FILE {
  27. LARGE_INTEGER LastWriteTime;
  28. PWSTR FileContents;
  29. PWSTR EndOfFile;
  30. PWSTR BeginLine;
  31. PWSTR EndOfLine;
  32. PWSTR NextLine;
  33. } REG_UNICODE_FILE, * PREG_UNICODE_FILE;
  34. NTSTATUS
  35. DatReadMultiSzFile(
  36. #ifdef FE_SB
  37. UINT uCodePage,
  38. #endif
  39. PUNICODE_STRING FileName,
  40. PVOID * ValueBuffer,
  41. PULONG ValueLength
  42. );
  43. NTSTATUS
  44. DatLoadAsciiFileAsUnicode(
  45. #ifdef FE_SB
  46. UINT uCodePage,
  47. #endif
  48. PUNICODE_STRING FileName,
  49. PREG_UNICODE_FILE UnicodeFile
  50. );
  51. BOOLEAN
  52. DatGetMultiString(
  53. PUNICODE_STRING ValueString,
  54. PUNICODE_STRING MultiString
  55. );
  56. BOOL
  57. OutputIniData(
  58. PUNICODE_STRING FileName,
  59. LPWSTR OutFileCandidate,
  60. DWORD dwOutFile,
  61. PVOID pValueBuffer,
  62. ULONG ValueLength
  63. );