ReactOS  0.4.15-dev-3453-gff89651
fxautostring.hpp
Go to the documentation of this file.
1 /*++
2 
3 Copyright (c) Microsoft Corporation
4 
5 Module Name:
6 
7  FxAutoString.hpp
8 
9 Abstract:
10 
11  This is the C++ header for FxAutoString which represents a UNICODE_STRING
12  and follows the RAII (resource acquisiion is initialization) pattern where
13  it frees the buffer when the struct goes out of scope.
14 
15 Author:
16 
17 
18 
19 Revision History:
20 
21 
22 
23 --*/
24 
25 #ifndef _FXAUTOSTRING_H_
26 #define _FXAUTOSTRING_H_
27 
28 struct FxAutoString {
30  VOID
31  )
32  {
34  }
35 
37  VOID
38  )
39  {
40  if (m_UnicodeString.Buffer != NULL) {
41 #if _WDFLDR_
43 #else
45 #endif
47  }
48  }
49 
51 };
52 
53 #endif // _FXAUTOSTRING_H_
FxAutoString(VOID)
~FxAutoString(VOID)
#define NULL
Definition: types.h:112
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
UNICODE_STRING m_UnicodeString
void FxPoolFree(__in_xcount(ptr is at an offset from AllocationStart) PVOID ptr)
Definition: wdfpool.cpp:361
#define ExFreePool(addr)
Definition: env_spec_w32.h:352