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.

78 lines
1.8 KiB

  1. #ifndef _CLIST_H
  2. #define _CLIST_H
  3. #include "Main.h"
  4. typedef struct Kernel_Policy
  5. {
  6. TCHAR Tracking[25];
  7. TCHAR UrlToLaunch[MAX_PATH];
  8. TCHAR SecondLevelData[10];
  9. TCHAR FileCollection[10];
  10. TCHAR BucketID[100];
  11. TCHAR Response[MAX_PATH];
  12. TCHAR fDoc[10];
  13. TCHAR iData[10];
  14. TCHAR GetFile [1000];
  15. TCHAR MemoryDump[10];
  16. TCHAR RegKey[1000];
  17. TCHAR GetFileVersion [1000];
  18. TCHAR WQL[MAX_PATH];
  19. TCHAR CrashPerBucketCount[10];
  20. TCHAR AllowResponse[10];
  21. }KERNEL_POLICY, *PKERNEL_POLICY;
  22. typedef struct Csv_Layout
  23. {
  24. int iSBucketID;
  25. TCHAR szSBucketString[MAX_PATH];
  26. TCHAR szSBucketResponse[MAX_PATH];
  27. TCHAR szGBucketResponse[MAX_PATH];
  28. int icount;
  29. struct Csv_Layout *Prev;
  30. struct Csv_Layout *Next;
  31. } CSV_LAYOUT, *PCSV_LAYOUT;
  32. class Clist
  33. {
  34. private:
  35. PCSV_LAYOUT m_Head;
  36. PCSV_LAYOUT m_CurrentPos;
  37. HANDLE m_hCsv;
  38. FILE * m_fpCsv;
  39. TCHAR m_szCsvFileName[MAX_PATH];
  40. BOOL LoadCsvFile();
  41. public:
  42. KERNEL_POLICY KrnlPolicy;
  43. TCHAR KernelStatusDir[MAX_PATH];
  44. BOOL bInitialized;
  45. BOOL GetNextEntry( TCHAR *szSBucketID,
  46. TCHAR *szSBucketString,
  47. TCHAR *szSResponse1,
  48. TCHAR *szGResponse2,
  49. TCHAR *szCount,
  50. BOOL *bEOF
  51. );
  52. BOOL AddEntry(TCHAR *szSBucketID,
  53. TCHAR *szSBucketString,
  54. TCHAR *szSResponse1,
  55. TCHAR *szGResponse2,
  56. TCHAR *szCount);
  57. BOOL Initialize(TCHAR *szCsvFileName);
  58. void ResetCurrPos() { m_CurrentPos = m_Head;}
  59. BOOL Clist::UpdateList(TCHAR *szSBucketID,
  60. TCHAR *szSBucketString,
  61. TCHAR *szSResponse1,
  62. TCHAR *szGResponse2
  63. );
  64. void Clist::WriteCsv();
  65. void CleanupList();
  66. BOOL IsInitialized() { return bInitialized;}
  67. Clist() {m_Head = NULL;m_CurrentPos = NULL; bInitialized = FALSE;}
  68. ~Clist() { CleanupList(); m_Head = NULL; m_CurrentPos = NULL; }
  69. };
  70. #endif