Source code of Windows XP (NT5)
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.

62 lines
1.3 KiB

  1. /*+-------------------------------------------------------------------------+
  2. | Copyright 1993-1994 (C) Microsoft Corporation - All rights reserved. |
  3. +-------------------------------------------------------------------------+*/
  4. #ifndef _HMAPFILE_
  5. #define _HMAPFILE_
  6. #ifdef __cplusplus
  7. extern "C"{
  8. #endif
  9. typedef struct _MAP_LINE {
  10. struct _MAP_LINE *next;
  11. struct _MAP_LINE *prev;
  12. LPTSTR Line;
  13. } MAP_LINE;
  14. typedef struct _MAP_SECTION {
  15. struct _MAP_SECTION *next;
  16. struct _MAP_SECTION *prev;
  17. LPTSTR Name;
  18. MAP_LINE *FirstLine;
  19. MAP_LINE *LastLine;
  20. ULONG LineCount;
  21. } MAP_SECTION;
  22. typedef struct _MAP_FILE {
  23. HANDLE hf;
  24. BOOL Modified;
  25. MAP_SECTION *FirstSection;
  26. MAP_SECTION *LastSection;
  27. MAP_SECTION *CurrentSection;
  28. MAP_LINE *CurrentLine;
  29. ULONG SectionCount;
  30. TCHAR Name[];
  31. } MAP_FILE;
  32. #define FILE_CACHE_SIZE 2048
  33. #define MAX_LINE_LEN 512
  34. #define SECTION_BEGIN_CHAR '['
  35. #define SECTION_END_CHAR ']'
  36. #define COMMENT_CHAR ';'
  37. #define WORD_DELIMITER ','
  38. BOOL MapFileCreate(HWND hDlg, LPTSTR FileName, LPTSTR Server);
  39. DWORD map_UsersEnum(MAP_FILE *hMap, USER_LIST **lpUsers);
  40. DWORD map_GroupsEnum(MAP_FILE *hMap, GROUP_LIST **lpGroups);
  41. MAP_FILE *map_Open(TCHAR *FileName);
  42. void map_Close(MAP_FILE *hMap);
  43. #ifdef __cplusplus
  44. }
  45. #endif
  46. #endif