WDK Mini Filter Example
change/utility.h
Go to the documentation of this file.
1 /*++
2 
3 Copyright (c) Microsoft Corporation. All Rights Reserved
4 
5 Module Name:
6 
7  utility.h
8 
9 Abstract:
10 
11  Header file which contains the structures, type definitions,
12  constants, global variables and function prototypes that are
13  only visible within the kernel. The functions include
14  generic table routines.
15 
16 Environment:
17 
18  Kernel mode
19 
20 --*/
21 #ifndef __UTILITY_H__
22 #define __UTILITY_H__
23 
24 #define CG_MUTEX_TAG 'tMgC'
25 
26 FORCEINLINE
27 PFAST_MUTEX
29  VOID
30  )
31 {
32  //
33  // Fast mutex by its rule has to be in the non-paged pool
34  //
35 
36  return ExAllocatePoolWithTag( NonPagedPoolNx,
37  sizeof( FAST_MUTEX ),
38  CG_MUTEX_TAG );
39 }
40 
41 FORCEINLINE
42 VOID
44  _In_ PFAST_MUTEX Mutex
45  )
46 {
47 
48  ExFreePoolWithTag( Mutex,
49  CG_MUTEX_TAG );
50 }
51 
52 #define LIST_FOR_EACH_SAFE(curr, n, head) \
53  for (curr = (head)->Flink , n = curr->Flink ; curr != (head); \
54  curr = n, n = curr->Flink )
55 
56 
57 #endif
58 
#define CG_MUTEX_TAG
FORCEINLINE VOID CgFreeMutex(_In_ PFAST_MUTEX Mutex)
FORCEINLINE PFAST_MUTEX CgAllocateMutex(VOID)

Social Network


Services Overview

Architect, implement and test file system filter drivers for a wide range of functionality. We can offer several levels of assistance to meet your specific.

Contact Us

You are welcome to contact us for salse or partnership.

Sales: sales@easefilter.com
Support: support@easefilter.com
Info: info@easefilter.com