1 /*++
2 
3 Copyright (c) Microsoft Corporation
4 
5 Module Name:
6 
7     FxCxDeviceInit.hpp
8 
9 Abstract:
10 
11 
12 Author:
13 
14 
15 Environment:
16 
17     kernel mode only
18 
19 Revision History:
20 
21 --*/
22 
23 #ifndef __FXCXDEVICEINIT_HPP__
24 #define __FXCXDEVICEINIT_HPP__
25 
26 //
27 // Holds class extension file object configuration.
28 //
29 struct CxFileObjectInit {
30     WDF_FILEOBJECT_CLASS Class;
31 
32     WDF_OBJECT_ATTRIBUTES Attributes;
33 
34     WDFCX_FILEOBJECT_CONFIG Callbacks;
35 
36     WDF_TRI_STATE AutoForwardCleanupClose;
37 
38     BOOLEAN Set;
39 };
40 
41 //
42 // The typedef for a pointer to this structure is exposed in wdfdevice.h
43 //
44 struct WDFCXDEVICE_INIT : public FxStump {
45 public:
46     WDFCXDEVICE_INIT();
47     ~WDFCXDEVICE_INIT();
48 
49     static
50     _Must_inspect_result_
51     PWDFCXDEVICE_INIT
52     _AllocateCxDeviceInit(
53         __in PWDFDEVICE_INIT DeviceInit
54         );
55 
56 public:
57     //
58     // Class extension init list entry.
59     //
60     LIST_ENTRY              ListEntry;
61 
62     //
63     // Client and Cx's globals.
64     //
65     PFX_DRIVER_GLOBALS      ClientDriverGlobals;
66     PFX_DRIVER_GLOBALS      CxDriverGlobals;
67 
68     //
69     // Pre-proc info.
70     //
71     FxIrpPreprocessInfo*    PreprocessInfo;
72 
73     //
74     // In caller context info.
75     //
76     PFN_WDF_IO_IN_CALLER_CONTEXT IoInCallerContextCallback;
77 
78     //
79     // Request attributes info.
80     //
81     WDF_OBJECT_ATTRIBUTES   RequestAttributes;
82 
83     //
84     // File object info.
85     //
86     CxFileObjectInit        FileObject;
87 
88     //
89     // Set during the device create.
90     //
91     FxCxDeviceInfo*         CxDeviceInfo;
92 };
93 
94 #endif // __FXCXDEVICEINIT_HPP__
95 
96