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.

664 lines
16 KiB

  1. //
  2. // Copyright (c) Microsoft Corporation. All rights reserved.
  3. // Copyright 1997-2002 OSR, Open Systems Resources, Inc. All rights Reserved.
  4. //
  5. // Module Name:
  6. //
  7. // ddk_ext.h
  8. //
  9. // Abstract:
  10. //
  11. // This module defines the Driver Vefifier Extensions that live
  12. // as part of the Windows DDK.
  13. //
  14. // Author:
  15. // v-markca 6-Jun-2002 Initial Version
  16. //
  17. // Revision History:
  18. //
  19. #include <ntverp.h>
  20. #if (VER_PRODUCTBUILD >= 2600) && !defined(_WDMDDK_)
  21. VOID
  22. DDK_KeAcquireInStackQueuedSpinLock(
  23. IN PKSPIN_LOCK SpinLock,
  24. IN PKLOCK_QUEUE_HANDLE LockHandle,
  25. PVOID F, ULONG L);
  26. VOID
  27. DDK_KeReleaseInStackQueuedSpinLock(
  28. IN PKLOCK_QUEUE_HANDLE LockHandle,
  29. PVOID F, ULONG L);
  30. VOID
  31. DDK_KeAcquireInStackQueuedSpinLockAtDpcLevel(
  32. IN PKSPIN_LOCK SpinLock,
  33. IN PKLOCK_QUEUE_HANDLE LockHandle,
  34. PVOID F, ULONG L);
  35. VOID
  36. DDK_KeReleaseInStackQueuedSpinLockFromDpcLevel(
  37. IN PKLOCK_QUEUE_HANDLE LockHandle,
  38. PVOID F, ULONG L);
  39. #endif
  40. //
  41. //
  42. //
  43. VOID
  44. NTAPI
  45. DDK_KeInitializeSpinLock (
  46. IN PKSPIN_LOCK SpinLock,
  47. PVOID F, ULONG L);
  48. //
  49. //
  50. //
  51. VOID
  52. DDK_KeAcquireSpinLock(
  53. IN PKSPIN_LOCK SpinLock,
  54. OUT PKIRQL OldIrql,
  55. PVOID F, ULONG L);
  56. //
  57. //
  58. //
  59. VOID
  60. DDK_KeReleaseSpinLock (
  61. IN PKSPIN_LOCK SpinLock,
  62. IN KIRQL NewIrql,
  63. PVOID F, ULONG L);
  64. //
  65. //
  66. //
  67. VOID
  68. DDK_KeAcquireSpinLockAtDpcLevel (
  69. IN PKSPIN_LOCK SpinLock,
  70. PVOID F, ULONG L);
  71. //
  72. //
  73. //
  74. VOID
  75. DDK_KeReleaseSpinLockFromDpcLevel (
  76. IN PKSPIN_LOCK SpinLock,
  77. PVOID F, ULONG L);
  78. KIRQL
  79. DDK_KeAcquireInterruptSpinLock (
  80. IN PKINTERRUPT Interrupt,
  81. PVOID F, ULONG L);
  82. VOID
  83. DDK_KeReleaseInterruptSpinLock (
  84. IN PKINTERRUPT Interrupt,
  85. IN KIRQL OldIrql,
  86. PVOID F, ULONG L);
  87. //
  88. #if _WIN32_WINNT >= 0x0501
  89. #ifdef KeAcquireInStackQueuedSpinLock
  90. #undef KeAcquireInStackQueuedSpinLock
  91. #endif
  92. #define KeAcquireInStackQueuedSpinLock(a,b) DDK_KeAcquireInStackQueuedSpinLock(a,b,__FILE__,__LINE__)
  93. #ifdef KeReleaseInStackQueuedSpinLock
  94. #undef KeReleaseInStackQueuedSpinLock
  95. #endif
  96. #define KeReleaseInStackQueuedSpinLock(a) DDK_KeReleaseInStackQueuedSpinLock(a,__FILE__,__LINE__)
  97. #ifdef KeAcquireInStackQueuedSpinLockAtDpcLevel
  98. #undef KeAcquireInStackQueuedSpinLockAtDpcLevel
  99. #endif
  100. #define KeAcquireInStackQueuedSpinLockAtDpcLevel(a,b) DDK_KeAcquireInStackQueuedSpinLockAtDpcLevel(a,b,__FILE__,__LINE__)
  101. #ifdef KeReleaseInStackQueuedSpinLockFromDpcLevel
  102. #undef KeReleaseInStackQueuedSpinLockFromDpcLevel
  103. #endif
  104. #define KeReleaseInStackQueuedSpinLockFromDpcLevel(a) DDK_KeReleaseInStackQueuedSpinLockFromDpcLevel(a,__FILE__,__LINE__)
  105. #endif
  106. #ifdef KeAcquireSpinLock
  107. #undef KeAcquireSpinLock
  108. #endif
  109. #define KeAcquireSpinLock(a,b) DDK_KeAcquireSpinLock(a,b,__FILE__,__LINE__)
  110. #ifdef KeReleaseSpinLock
  111. #undef KeReleaseSpinLock
  112. #endif
  113. #define KeReleaseSpinLock(a,b) DDK_KeReleaseSpinLock(a,b,__FILE__,__LINE__)
  114. #ifdef KeAcquireSpinLockAtDpcLevel
  115. #undef KeAcquireSpinLockAtDpcLevel
  116. #endif
  117. #define KeAcquireSpinLockAtDpcLevel(a) DDK_KeAcquireSpinLockAtDpcLevel(a,__FILE__,__LINE__)
  118. #ifdef KeReleaseSpinLockFromDpcLevel
  119. #undef KeReleaseSpinLockFromDpcLevel
  120. #endif
  121. #define KeReleaseSpinLockFromDpcLevel(a) DDK_KeReleaseSpinLockFromDpcLevel(a,__FILE__,__LINE__)
  122. #ifdef KeInitializeSpinLock
  123. #undef KeInitializeSpinLock
  124. #endif
  125. #define KeInitializeSpinLock(a) DDK_KeInitializeSpinLock(a,__FILE__,__LINE__)
  126. NTSTATUS
  127. DDK_IoConnectInterrupt(
  128. OUT PKINTERRUPT *InterruptObject,
  129. IN PKSERVICE_ROUTINE ServiceRoutine,
  130. IN PVOID ServiceContext,
  131. IN PKSPIN_LOCK SpinLock OPTIONAL,
  132. IN ULONG Vector,
  133. IN KIRQL Irql,
  134. IN KIRQL SynchronizeIrql,
  135. IN KINTERRUPT_MODE InterruptMode,
  136. IN BOOLEAN ShareVector,
  137. IN KAFFINITY ProcessorEnableMask,
  138. IN BOOLEAN FloatingSave,
  139. PVOID F, ULONG L);
  140. //
  141. #ifdef IoConnectInterrupt
  142. #undef IoConnectInterrupt
  143. #endif
  144. #define IoConnectInterrupt(a,b,c,d,e,f,g,h,i,j,k) DDK_IoConnectInterrupt(a,b,c,d,e,f,g,h,i,j,k,__FILE__,__LINE__)
  145. #if _WIN32_WINNT < 0x0501
  146. #define PSLIST_ENTRY PSINGLE_LIST_ENTRY
  147. #define SLIST_ENTRY SINGLE_LIST_ENTRY
  148. #endif
  149. VOID
  150. DDK_ExInitializeSListHead(
  151. IN PSLIST_HEADER SListHead,
  152. PVOID F,ULONG L);
  153. USHORT
  154. DDK_ExQueryDepthSList(
  155. IN PSLIST_HEADER SListHead,
  156. PVOID F, ULONG L);
  157. PSLIST_ENTRY
  158. DDK_ExInterlockedPopEntrySList(
  159. IN PSLIST_HEADER ListHead,
  160. IN PKSPIN_LOCK Lock,
  161. PVOID F, ULONG L);
  162. PSLIST_ENTRY
  163. DDK_ExInterlockedPushEntrySList(
  164. IN PSLIST_HEADER ListHead,
  165. IN PSLIST_ENTRY ListEntry,
  166. IN PKSPIN_LOCK Lock,
  167. PVOID F, ULONG L);
  168. PSLIST_ENTRY
  169. DDK_ExInterlockedFlushSList(
  170. IN PSLIST_HEADER ListHead,
  171. PVOID F, ULONG L);
  172. PSINGLE_LIST_ENTRY
  173. DDK_ExInterlockedPushEntryList(
  174. IN PSINGLE_LIST_ENTRY ListHead,
  175. IN PSINGLE_LIST_ENTRY ListEntry,
  176. IN PKSPIN_LOCK,
  177. PVOID F, ULONG L);
  178. PSINGLE_LIST_ENTRY
  179. DDK_ExInterlockedPopEntryList(
  180. IN PSINGLE_LIST_ENTRY ListHead,
  181. IN PKSPIN_LOCK,
  182. PVOID F, ULONG L);
  183. VOID
  184. DDK_InitializeListHead(
  185. IN PLIST_ENTRY ListHead,
  186. PVOID F, ULONG L);
  187. VOID
  188. DDK_InsertHeadList(
  189. IN PLIST_ENTRY ListHead,
  190. IN PLIST_ENTRY Entry,
  191. PVOID F, ULONG L);
  192. VOID
  193. DDK_InsertTailList(
  194. IN PLIST_ENTRY ListHead,
  195. IN PLIST_ENTRY Entry,
  196. PVOID F, ULONG L);
  197. PLIST_ENTRY
  198. DDK_RemoveHeadList(
  199. IN PLIST_ENTRY ListHead,
  200. PVOID F, ULONG L);
  201. PLIST_ENTRY
  202. DDK_RemoveTailList(
  203. IN PLIST_ENTRY ListHead,
  204. PVOID F, ULONG L);
  205. BOOLEAN
  206. DDK_IsListEmpty(
  207. IN PLIST_ENTRY ListHead,
  208. PVOID F, ULONG L);
  209. PLIST_ENTRY
  210. DDK_ExInterlockedInsertHeadList(
  211. IN PLIST_ENTRY ListHead,
  212. IN PLIST_ENTRY ListEntry,
  213. IN PKSPIN_LOCK Lock,
  214. PVOID F, ULONG L);
  215. PLIST_ENTRY
  216. DDK_ExInterlockedInsertTailList(
  217. IN PLIST_ENTRY ListHead,
  218. IN PLIST_ENTRY ListEntry,
  219. IN PKSPIN_LOCK Lock,
  220. PVOID F, ULONG L);
  221. PLIST_ENTRY
  222. DDK_ExInterlockedRemoveHeadList(
  223. IN PLIST_ENTRY ListHead,
  224. IN PKSPIN_LOCK Lock,
  225. PVOID F, ULONG L);
  226. #ifdef ExInitializeSListHead
  227. #undef ExInitializeSListHead
  228. #endif
  229. #define ExInitializeSListHead(ListHead) DDK_ExInitializeSListHead(ListHead,__FILE__,__LINE__)
  230. #ifdef ExQueryDepthSList
  231. #undef ExQueryDepthSList
  232. #endif
  233. #define ExQueryDepthSList(ListHead) DDK_ExQueryDepthSList(ListHead,__FILE__,__LINE__)
  234. #ifdef ExInterlockedPopEntrySList
  235. #undef ExInterlockedPopEntrySList
  236. #endif
  237. #define ExInterlockedPopEntrySList(ListHead,Lock) DDK_ExInterlockedPopEntrySList(ListHead,Lock,__FILE__,__LINE__)
  238. #ifdef ExInterlockedPushEntrySList
  239. #undef ExInterlockedPushEntrySList
  240. #endif
  241. #define ExInterlockedPushEntrySList(ListHead,Entry,Lock) DDK_ExInterlockedPushEntrySList(ListHead,Entry,Lock,__FILE__,__LINE__)
  242. #ifdef ExInterlockedFlushSList
  243. #undef ExInterlockedFlushSList
  244. #endif
  245. #define ExInterlockedFlushSList(ListHead) DDK_ExInterlockedFlushSList(ListHead,__FILE__,__LINE__)
  246. //
  247. // Doubly Linked List Routines
  248. //
  249. #ifdef InitializeListHead
  250. #undef InitializeListHead
  251. #endif
  252. #define InitializeListHead(ListHead) DDK_InitializeListHead(ListHead,__FILE__,__LINE__)
  253. #ifdef InsertHeadList
  254. #undef InsertHeadList
  255. #endif
  256. #define InsertHeadList(ListHead,Entry) DDK_InsertHeadList(ListHead,Entry,__FILE__,__LINE__)
  257. #ifdef InsertTailList
  258. #undef InsertTailList
  259. #endif
  260. #define InsertTailList(ListHead,Entry) DDK_InsertTailList(ListHead,Entry,__FILE__,__LINE__)
  261. #ifdef RemoveHeadList
  262. #undef RemoveHeadList
  263. #endif
  264. #define RemoveHeadList(ListHead) DDK_RemoveHeadList(ListHead,__FILE__,__LINE__)
  265. #ifdef RemoveTailList
  266. #undef RemoveTailList
  267. #endif
  268. #define RemoveTailList(ListHead) DDK_RemoveTailList(ListHead,__FILE__,__LINE__)
  269. #ifdef IsListEmpty
  270. #undef IsListEmpty
  271. #endif
  272. #define IsListEmpty(ListHead) DDK_IsListEmpty(ListHead,__FILE__,__LINE__)
  273. //
  274. // Interlocked List Routines
  275. //
  276. #ifdef ExInterlockedInsertHeadList
  277. #undef ExInterlockedInsertHeadList
  278. #endif
  279. #define ExInterlockedInsertHeadList(_ListHead,_ListEntry,_SpinLock) DDK_ExInterlockedInsertHeadList(_ListHead,_ListEntry,_SpinLock,__FILE__,__LINE__)
  280. #ifdef ExInterlockedInsertTailList
  281. #undef ExInterlockedInsertTailList
  282. #endif
  283. #define ExInterlockedInsertTailList(_ListHead,_ListEntry,_SpinLock) DDK_ExInterlockedInsertTailList(_ListHead,_ListEntry,_SpinLock,__FILE__,__LINE__)
  284. #ifdef ExInterlockedRemoveHeadList
  285. #undef ExInterlockedRemoveHeadList
  286. #endif
  287. #define ExInterlockedRemoveHeadList(_ListHead,_SpinLock) DDK_ExInterlockedRemoveHeadList(_ListHead,_SpinLock,__FILE__,__LINE__)
  288. //
  289. // Lookaside List Routines
  290. //
  291. VOID
  292. NTAPI
  293. DDK_ExInitializePagedLookasideList (
  294. IN PPAGED_LOOKASIDE_LIST Lookaside,
  295. IN PALLOCATE_FUNCTION Allocate,
  296. IN PFREE_FUNCTION Free,
  297. IN ULONG Flags,
  298. IN SIZE_T Size,
  299. IN ULONG Tag,
  300. IN USHORT Depth,
  301. PVOID F, ULONG L);
  302. VOID
  303. NTAPI
  304. DDK_ExDeletePagedLookasideList (
  305. IN PPAGED_LOOKASIDE_LIST Lookaside,
  306. PVOID F, ULONG L);
  307. VOID
  308. NTAPI
  309. DDK_ExInitializeNPagedLookasideList (
  310. IN PNPAGED_LOOKASIDE_LIST Lookaside,
  311. IN PALLOCATE_FUNCTION Allocate,
  312. IN PFREE_FUNCTION Free,
  313. IN ULONG Flags,
  314. IN SIZE_T Size,
  315. IN ULONG Tag,
  316. IN USHORT Depth,
  317. PVOID F, ULONG L);
  318. VOID
  319. NTAPI
  320. DDK_ExDeleteNPagedLookasideList (
  321. IN PNPAGED_LOOKASIDE_LIST Lookaside,
  322. PVOID F, ULONG L);
  323. PVOID
  324. NTAPI
  325. DDK_ExAllocateFromPagedLookasideList(
  326. IN PPAGED_LOOKASIDE_LIST Lookaside,
  327. PVOID F, ULONG L);
  328. VOID
  329. NTAPI
  330. DDK_ExFreeToPagedLookasideList(
  331. IN PPAGED_LOOKASIDE_LIST Lookaside,
  332. IN PVOID Entry,
  333. PVOID F, ULONG L);
  334. PVOID
  335. NTAPI
  336. DDK_ExAllocateFromNPagedLookasideList(
  337. IN PNPAGED_LOOKASIDE_LIST Lookaside,
  338. PVOID F, ULONG L);
  339. VOID
  340. NTAPI
  341. DDK_ExFreeToNPagedLookasideList(
  342. IN PNPAGED_LOOKASIDE_LIST Lookaside,
  343. IN PVOID Entry,
  344. PVOID F, ULONG L);
  345. //
  346. #ifdef ExInitializePagedLookasideList
  347. #undef ExInitializePagedLookasideList
  348. #endif
  349. #define ExInitializePagedLookasideList(a,b,c,d,e,f,g) DDK_ExInitializePagedLookasideList(a,b,c,d,e,f,g,__FILE__,__LINE__)
  350. #ifdef ExDeletePagedLookasideList
  351. #undef ExDeletePagedLookasideList
  352. #endif
  353. #define ExDeletePagedLookasideList(a) DDK_ExDeletePagedLookasideList(a,__FILE__,__LINE__)
  354. #ifdef ExInitializeNPagedLookasideList
  355. #undef ExInitializeNPagedLookasideList
  356. #endif
  357. #define ExInitializeNPagedLookasideList(a,b,c,d,e,f,g) DDK_ExInitializeNPagedLookasideList(a,b,c,d,e,f,g,__FILE__,__LINE__)
  358. #ifdef ExDeleteNPagedLookasideList
  359. #undef ExDeleteNPagedLookasideList
  360. #endif
  361. #define ExDeleteNPagedLookasideList(a) DDK_ExDeleteNPagedLookasideList(a,__FILE__,__LINE__)
  362. #ifdef ExAllocateFromPagedLookasideList
  363. #undef ExAllocateFromPagedLookasideList
  364. #endif
  365. #define ExAllocateFromPagedLookasideList(a) DDK_ExAllocateFromPagedLookasideList(a,__FILE__,__LINE__)
  366. #ifdef ExFreeToPagedLookasideList
  367. #undef ExFreeToPagedLookasideList
  368. #endif
  369. #define ExFreeToPagedLookasideList(a,b) DDK_ExFreeToPagedLookasideList(a,b,__FILE__,__LINE__)
  370. #ifdef ExAllocateFromNPagedLookasideList
  371. #undef ExAllocateFromNPagedLookasideList
  372. #endif
  373. #define ExAllocateFromNPagedLookasideList(a) DDK_ExAllocateFromNPagedLookasideList(a,__FILE__,__LINE__)
  374. #ifdef ExFreeToNPagedLookasideList
  375. #undef ExFreeToNPagedLookasideList
  376. #endif
  377. #define ExFreeToNPagedLookasideList(a,b) DDK_ExFreeToNPagedLookasideList(a,b,__FILE__,__LINE__)
  378. //IoGetCurrentIrpStackLocation;
  379. PIO_STACK_LOCATION
  380. DDK_IoGetCurrentIrpStackLocation(
  381. IN PIRP Irp,
  382. PVOID F, ULONG L);
  383. //IoGetNextIrpStackLocation;
  384. PIO_STACK_LOCATION
  385. DDK_IoGetNextIrpStackLocation(
  386. IN PIRP Irp,
  387. PVOID F, ULONG L);
  388. //IoMarkIrpPending;
  389. VOID
  390. DDK_IoMarkIrpPending(
  391. IN OUT PIRP Irp,
  392. PVOID F, ULONG L);
  393. //IoSetCancelRoutine;
  394. PDRIVER_CANCEL
  395. DDK_IoSetCancelRoutine(
  396. IN PIRP Irp,
  397. IN PDRIVER_CANCEL CancelRoutine,
  398. PVOID F, ULONG L);
  399. //IoSetCompletionRoutine;
  400. VOID
  401. DDK_IoSetCompletionRoutine(
  402. IN PIRP Irp,
  403. IN PIO_COMPLETION_ROUTINE CompletionRoutine,
  404. IN PVOID Context,
  405. IN BOOLEAN InvokeOnSuccess,
  406. IN BOOLEAN InvokeOnError,
  407. IN BOOLEAN InvokeOnCancel,
  408. PVOID F, ULONG L);
  409. VOID
  410. DDK_IoSetCompletionRoutineEx(
  411. IN PDEVICE_OBJECT DeviceObject,
  412. IN PIRP Irp,
  413. IN PIO_COMPLETION_ROUTINE CompletionRoutine,
  414. IN PVOID Context,
  415. IN BOOLEAN InvokeOnSuccess,
  416. IN BOOLEAN InvokeOnError,
  417. IN BOOLEAN InvokeOnCancel,
  418. PVOID F, ULONG L);
  419. //IoSetNextIrpStackLocation;
  420. VOID
  421. DDK_IoSetNextIrpStackLocation(
  422. IN OUT PIRP Irp,
  423. PVOID F, ULONG L);
  424. //IoCopyCurrentIrpStackLocationToNext;
  425. VOID
  426. DDK_IoCopyCurrentIrpStackLocationToNext(
  427. IN PIRP Irp,
  428. PVOID F, ULONG L);
  429. //IoSkipCurrentIrpStackLocation
  430. VOID
  431. DDK_IoSkipCurrentIrpStackLocation(
  432. IN PIRP Irp,
  433. PVOID F, ULONG L);
  434. //
  435. #ifdef IoGetCurrentIrpStackLocation
  436. #undef IoGetCurrentIrpStackLocation
  437. #endif
  438. #define IoGetCurrentIrpStackLocation(a) DDK_IoGetCurrentIrpStackLocation(a,__FILE__,__LINE__)
  439. #ifdef IoGetNextIrpStackLocation
  440. #undef IoGetNextIrpStackLocation
  441. #endif
  442. #define IoGetNextIrpStackLocation(a) DDK_IoGetNextIrpStackLocation(a,__FILE__,__LINE__)
  443. #ifdef IoMarkIrpPending
  444. #undef IoMarkIrpPending
  445. #endif
  446. #define IoMarkIrpPending(a) DDK_IoMarkIrpPending(a,__FILE__,__LINE__)
  447. #ifdef IoSetCancelRoutine
  448. #undef IoSetCancelRoutine
  449. #endif
  450. #define IoSetCancelRoutine(a,b) DDK_IoSetCancelRoutine(a,b,__FILE__,__LINE__)
  451. #ifdef IoSetCompletionRoutine
  452. #undef IoSetCompletionRoutine
  453. #endif
  454. #define IoSetCompletionRoutine(a,b,c,d,e,f) DDK_IoSetCompletionRoutine(a,b,c,d,e,f,__FILE__,__LINE__)
  455. #ifdef IoSetCompletionRoutineEx
  456. #undef IoSetCompletionRoutineEx
  457. #endif
  458. #define IoSetCompletionRoutineEx(a,b,c,d,e,f,g) DDK_IoSetCompletionRoutineEx(a,b,c,d,e,f,g,__FILE__,__LINE__)
  459. #ifdef IoSetNextIrpStackLocation
  460. #undef IoSetNextIrpStackLocation
  461. #endif
  462. #define IoSetNextIrpStackLocation(a) DDK_IoSetNextIrpStackLocation(a,__FILE__,__LINE__)
  463. #ifdef IoCopyCurrentIrpStackLocationToNext
  464. #undef IoCopyCurrentIrpStackLocationToNext
  465. #endif
  466. #define IoCopyCurrentIrpStackLocationToNext(a) DDK_IoCopyCurrentIrpStackLocationToNext(a,__FILE__,__LINE__)
  467. #ifdef IoSkipCurrentIrpStackLocation
  468. #undef IoSkipCurrentIrpStackLocation
  469. #endif
  470. #define IoSkipCurrentIrpStackLocation(a) DDK_IoSkipCurrentIrpStackLocation(a,__FILE__,__LINE__)
  471. //
  472. //
  473. PVOID
  474. NTAPI
  475. DDK_ExAllocatePool(
  476. IN POOL_TYPE PoolType,
  477. IN SIZE_T NumberOfBytes,
  478. PVOID F, ULONG L);
  479. #ifdef ExAllocatePool
  480. #undef ExAllocatePool
  481. #endif
  482. #if PRAGMA_DEPRECATED_DDK
  483. #pragma deprecated(ExAllocatePool) // Use ExAllocatePoolWithTag
  484. #endif
  485. #define ExAllocatePool(a, b) DDK_ExAllocatePool(a,b,__FILE__,__LINE__)
  486. PVOID
  487. NTAPI
  488. DDK_ExAllocatePoolWithQuota(
  489. IN POOL_TYPE PoolType,
  490. IN SIZE_T NumberOfBytes,
  491. PVOID F, ULONG L);
  492. #ifdef ExAllocatePoolWithQuota
  493. #undef ExAllocatePoolWithQuota
  494. #endif
  495. #if PRAGMA_DEPRECATED_DDK
  496. #pragma deprecated(ExAllocatePoolWithQuota) // Use ExAllocatePoolWithQuotaTag
  497. #endif
  498. #define ExAllocatePoolWithQuota(a,b) DDK_ExAllocatePoolWithQuota(a,b,__FILE__,__LINE__)
  499. PVOID
  500. NTAPI
  501. DDK_ExAllocatePoolWithTag(
  502. IN POOL_TYPE PoolType,
  503. IN SIZE_T NumberOfBytes,
  504. IN ULONG Tag,
  505. PVOID F, ULONG L);
  506. #ifdef ExAllocatePoolWithTag
  507. #undef ExAllocatePoolWithTag
  508. #endif
  509. #define ExAllocatePoolWithTag(a,b,c) DDK_ExAllocatePoolWithTag(a,b,c,__FILE__,__LINE__)
  510. PVOID
  511. NTAPI
  512. DDK_ExAllocatePoolWithTagPriority(
  513. IN POOL_TYPE PoolType,
  514. IN SIZE_T NumberOfBytes,
  515. IN ULONG Tag,
  516. IN EX_POOL_PRIORITY Priority,
  517. PVOID F, ULONG L);
  518. #ifdef ExAllocatePoolWithTagPriority
  519. #undef ExAllocatePoolWithTagPriority
  520. #endif
  521. #define ExAllocatePoolWithTagPriority(a,b,c,d) DDK_ExAllocatePoolWithTagPriority(a,b,c,d,__FILE__,__LINE__)
  522. PVOID
  523. NTAPI
  524. DDK_ExAllocatePoolWithQuotaTag(
  525. IN POOL_TYPE PoolType,
  526. IN SIZE_T NumberOfBytes,
  527. IN ULONG Tag,
  528. PVOID F, ULONG L);
  529. #ifdef ExAllocatePoolWithQuotaTag
  530. #undef ExAllocatePoolWithQuotaTag
  531. #endif
  532. #define ExAllocatePoolWithQuotaTag(a,b,c) DDK_ExAllocatePoolWithQuotaTag(a,b,c,__FILE__,__LINE__)
  533. VOID
  534. NTAPI
  535. DDK_ExFreePool(
  536. IN PVOID P,
  537. PVOID F, ULONG L);
  538. #ifdef ExFreePool
  539. #undef ExFreePool
  540. #endif
  541. #define ExFreePool(a) DDK_ExFreePool(a,__FILE__,__LINE__)
  542. VOID
  543. NTAPI
  544. DDK_ExFreePoolWithTag(
  545. IN PVOID P,
  546. IN ULONG Tag,
  547. PVOID F, ULONG L);
  548. #ifdef ExFreePoolWithTag
  549. #undef ExFreePoolWithTag
  550. #endif
  551. #define ExFreePoolWithTag(a,b) DDK_ExFreePoolWithTag(a,b,__FILE__,__LINE__)