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.

134 lines
3.7 KiB

  1. //========================================================================
  2. // Copyright (C) 1997 Microsoft Corporation
  3. // Author: RameshV
  4. // Description: This file has been generated. Pl look at the .c file
  5. //========================================================================
  6. #ifndef _MM_BITMASK_H_
  7. #define _MM_BITMASK_H_
  8. typedef struct _M_EXCL {
  9. DWORD Start;
  10. DWORD End;
  11. ULONG UniqId;
  12. } M_EXCL, *PM_EXCL, *LPM_EXCL;
  13. #define MM_FLAG_ALLOW_DHCP 0x1
  14. #define MM_FLAG_ALLOW_BOOTP 0x2
  15. typedef struct _M_BITMASK1 {
  16. DWORD Size; // Size in # of bits
  17. DWORD AllocSize; // Size in BYTES allocated
  18. DWORD nSet; // nBits set
  19. LPBYTE Mask; // BUBBUG making this DWORD would make things faster..
  20. DWORD Offset; // used by Bit2 type..
  21. ULONG nDirtyOps; // # of unsaved operations done on this bitmask?
  22. } M_BITMASK1, *PM_BITMASK1, *LPM_BITMASK1;
  23. typedef struct _M_BITMASK2 {
  24. DWORD Size;
  25. ARRAY_LOCATION Loc; // where to start off to look for a bit
  26. ARRAY Array; // Array of bitmask 1 types
  27. } M_BITMASK2, *PM_BITMASK2, *LPM_BITMASK2;
  28. typedef M_BITMASK2 M_BITMASK;
  29. typedef PM_BITMASK2 PM_BITMASK;
  30. typedef LPM_BITMASK2 LPM_BITMASK;
  31. #define MAX_BIT1SIZE (512*4)
  32. DWORD
  33. MemBitInit(
  34. OUT PM_BITMASK *Bits,
  35. IN DWORD nBits
  36. ) ;
  37. DWORD
  38. MemBitCleanup(
  39. IN OUT PM_BITMASK Bits
  40. ) ;
  41. DWORD
  42. MemBitSetOrClearAll(
  43. IN OUT PM_BITMASK Bits,
  44. IN BOOL fSet
  45. ) ;
  46. DWORD
  47. MemBitSetOrClear(
  48. IN OUT PM_BITMASK Bits,
  49. IN DWORD Location,
  50. IN BOOL fSet,
  51. IN LPBOOL fOldState
  52. ) ;
  53. BOOL
  54. MemBitIsSet(
  55. IN OUT PM_BITMASK Bits,
  56. IN DWORD Location
  57. ) ;
  58. DWORD
  59. MemBitGetSize(
  60. IN PM_BITMASK Bits
  61. ) ;
  62. DWORD
  63. MemBitGetSetBitsInRange(
  64. IN PM_BITMASK Bits,
  65. IN DWORD dwFrom,
  66. IN DWORD dwTo
  67. ) ;
  68. DWORD
  69. MemBitGetSetBitsSize(
  70. IN PM_BITMASK Bits
  71. ) ;
  72. DWORD
  73. MemBitAddOrDelBits(
  74. IN OUT PM_BITMASK Bits,
  75. IN DWORD nBitsToAddOrDelete,
  76. IN BOOL fAdd,
  77. IN BOOL fEnd
  78. ) ;
  79. DWORD
  80. MemBitGetSomeClearedBit(
  81. IN OUT PM_BITMASK Bits,
  82. OUT DWORD *Offset,
  83. IN BOOL fAcquire, // Acquire or just lookup?
  84. IN DWORD StartAddress,
  85. IN PARRAY Exclusions
  86. ) ;
  87. DWORD
  88. MemBitConvertToCluster(
  89. IN PM_BITMASK Bits,
  90. IN DWORD StartAddress,
  91. OUT LPBYTE *InUseClusters,
  92. OUT DWORD *InUseClustersSize,
  93. OUT LPBYTE *UsedClusters,
  94. OUT DWORD *UsedClustersSize
  95. ) ;
  96. #endif
  97. //========================================================================
  98. // end of file
  99. //========================================================================