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.

109 lines
2.8 KiB

  1. #ifndef _CUSER_LIST_H
  2. #define _CUSER_LIST_H
  3. #include "Main.h"
  4. #include "UserMode.h"
  5. // constants
  6. #define CWC_FIELD 64 // office still follows something close to 8.3
  7. #define CWC_VER_FIELD 24 // Changed to match backend database varchar(24)
  8. #define CWC_OFFSET_FIELD 16 // size for a 64bit HEX offset
  9. #define CWC_OFFSET_64BIT 16 // size for a 64bit HEX offset } used for validating size
  10. #define CWC_OFFSET_32BIT 8 // size for a 32bit HEX offset }
  11. #define DWURL_MAX 1024
  12. #define POLICYSTRSIZE 512
  13. typedef struct Global_Policy
  14. {
  15. TCHAR AllowBasic[10];
  16. TCHAR AllowAdvanced[10];
  17. TCHAR CabsPerBucket[10];
  18. TCHAR EnableCrashTracking[10];
  19. TCHAR AllowMicrosoftResponse[10];
  20. TCHAR CustomURL[MAX_PATH];
  21. TCHAR RedirectFileServer[MAX_PATH];
  22. }GLOBAL_POLICY, *PGLOBAL_POLICY;
  23. typedef struct UserBucket_Policy
  24. {
  25. TCHAR AllowBasic[10];
  26. TCHAR AllowAdvanced[10];
  27. TCHAR CabsPerBucket[10];
  28. TCHAR EnableCrashTracking[10];
  29. TCHAR AllowMicrosoftResponse[10];
  30. TCHAR CustomURL[MAX_PATH];
  31. }SELECTED_POLICY, *PSELECTED_POLICY;
  32. typedef struct Status_Contents
  33. {
  34. TCHAR Tracking[25];
  35. TCHAR UrlToLaunch[MAX_PATH];
  36. TCHAR SecondLevelData[10];
  37. TCHAR FileCollection[10];
  38. TCHAR BucketID[100];
  39. TCHAR Response[MAX_PATH];
  40. TCHAR fDoc[10];
  41. TCHAR iData[10];
  42. TCHAR GetFile [MAX_PATH];
  43. TCHAR MemoryDump[10];
  44. TCHAR RegKey[1024];
  45. TCHAR GetFileVersion [MAX_PATH];
  46. TCHAR WQL[1024];
  47. TCHAR CrashPerBucketCount[10];
  48. TCHAR AllowResponse[10];
  49. }STATUS_FILE, *PSTATUS_FILE;
  50. typedef struct User_Data
  51. {
  52. struct User_Data *Prev;
  53. struct User_Data *Next;
  54. TCHAR AppName[MAX_PATH];
  55. TCHAR AppVer[50];
  56. TCHAR ModName[100];
  57. TCHAR ModVer[50];
  58. TCHAR CountPath[MAX_PATH];
  59. TCHAR StatusPath[MAX_PATH];
  60. TCHAR BucketID[100];
  61. TCHAR Hits[10];
  62. TCHAR Cabs[10];
  63. TCHAR Offset[100];
  64. BOOL Is64Bit;
  65. TCHAR BucketPath[MAX_PATH]; // ?
  66. SELECTED_POLICY Policy;
  67. STATUS_FILE Status;
  68. int iIndex;
  69. TCHAR CabCount[10];
  70. int CollectionRequested;
  71. int CollectionAllowed;
  72. int iReportedCount;
  73. TCHAR ReportedCountPath[MAX_PATH];
  74. }USER_DATA, *PUSER_DATA;
  75. class CUserList
  76. {
  77. private:
  78. PUSER_DATA m_Head;
  79. PUSER_DATA m_CurrentPos;
  80. BOOL bInitialized;
  81. public:
  82. //BOOL GetNextEntry(PUSER_DATA);
  83. BOOL AddNode(PUSER_DATA);
  84. //BOOL Initialize(TCHAR *szCsvFileName);
  85. void ResetCurrPos() { m_CurrentPos = m_Head;}
  86. void CleanupList();
  87. BOOL IsInitialized() { return bInitialized;}
  88. BOOL GetNextEntry(PUSER_DATA CurrentNode, BOOL *bEOF);
  89. CUserList() {m_Head = NULL;m_CurrentPos = NULL; bInitialized = FALSE;}
  90. ~CUserList() { CleanupList(); m_Head = NULL; m_CurrentPos = NULL; }
  91. PUSER_DATA GetEntry(int iIndex);
  92. void SetIndex(int iIndex);
  93. BOOL MoveNext( BOOL *bEOF);
  94. int GetNextEntryNoMove(PUSER_DATA CurrentNode,BOOL *bEOF);
  95. int SetCurrentEntry(PUSER_DATA CurrentNode);
  96. };
  97. #endif