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.

69 lines
2.1 KiB

  1. /****************************************************************************/
  2. // valinfo.cpp
  3. //
  4. // Copyright (C) 1997-1999 Microsoft Corp.
  5. /****************************************************************************/
  6. #ifndef _TS_APP_SMP_VAL_INFO_
  7. #define _TS_APP_SMP_VAL_INFO_
  8. #include <stdio.h>
  9. #include "KeyNode.h"
  10. class ValueFullInfo
  11. {
  12. public:
  13. ValueFullInfo( KeyNode *pKey );
  14. ~ValueFullInfo();
  15. ULONG Size() { return size ; }
  16. KEY_VALUE_FULL_INFORMATION *Ptr() { return pInfo; }
  17. KEY_VALUE_INFORMATION_CLASS Type() { return KeyValueFullInformation; }
  18. NTSTATUS Status() { return status; }
  19. PCWSTR SzName();
  20. NTSTATUS Query( PCWSTR pValueName );
  21. NTSTATUS Delete( PCWSTR pValueName );
  22. NTSTATUS Create( ValueFullInfo *pNew );
  23. BOOLEAN Compare( ValueFullInfo *pOther ); // compare self to other,
  24. // TRUE mean the two values are the same.
  25. void Print( FILE *fp); // for debug dump
  26. private:
  27. ULONG size;
  28. KEY_VALUE_FULL_INFORMATION *pInfo;
  29. ULONG status;
  30. PWSTR pSzName;
  31. KeyNode *pKeyNode;
  32. };
  33. class ValuePartialInfo
  34. {
  35. public:
  36. ValuePartialInfo( KeyNode *pKey , ULONG defaultSize=0);
  37. ~ValuePartialInfo();
  38. ULONG Size() { return size ; }
  39. KEY_VALUE_PARTIAL_INFORMATION *Ptr() { return pInfo; }
  40. KEY_VALUE_INFORMATION_CLASS Type() { return KeyValuePartialInformation; }
  41. NTSTATUS Status() { return status; }
  42. NTSTATUS Query( PCWSTR pValueName );
  43. NTSTATUS Delete( PCWSTR pValueName );
  44. private:
  45. ULONG size;
  46. KEY_VALUE_PARTIAL_INFORMATION *pInfo;
  47. ULONG status;
  48. KeyNode *pKeyNode;
  49. };
  50. #endif