ReactOS  0.4.15-dev-3316-g067ca88
driverdbg.h
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS SDK
3  * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4  * PURPOSE: Helper functions for driver debugging
5  * COPYRIGHT: 2020 Victor Perevertkin (victor.perevertkin@reactos.org)
6  */
7 
8 #ifndef _DBG_DRIVERDBG_H_
9 #define _DBG_DRIVERDBG_H_
10 
12 PCHAR
15 {
16  switch (MinorFunction)
17  {
19  return "IRP_MN_START_DEVICE";
21  return "IRP_MN_QUERY_REMOVE_DEVICE";
23  return "IRP_MN_REMOVE_DEVICE";
25  return "IRP_MN_CANCEL_REMOVE_DEVICE";
26  case IRP_MN_STOP_DEVICE:
27  return "IRP_MN_STOP_DEVICE";
29  return "IRP_MN_QUERY_STOP_DEVICE";
31  return "IRP_MN_CANCEL_STOP_DEVICE";
33  return "IRP_MN_QUERY_DEVICE_RELATIONS";
35  return "IRP_MN_QUERY_INTERFACE";
37  return "IRP_MN_QUERY_CAPABILITIES";
39  return "IRP_MN_QUERY_RESOURCES";
41  return "IRP_MN_QUERY_RESOURCE_REQUIREMENTS";
43  return "IRP_MN_QUERY_DEVICE_TEXT";
45  return "IRP_MN_FILTER_RESOURCE_REQUIREMENTS";
46  case IRP_MN_READ_CONFIG:
47  return "IRP_MN_READ_CONFIG";
49  return "IRP_MN_WRITE_CONFIG";
50  case IRP_MN_EJECT:
51  return "IRP_MN_EJECT";
52  case IRP_MN_SET_LOCK:
53  return "IRP_MN_SET_LOCK";
54  case IRP_MN_QUERY_ID:
55  return "IRP_MN_QUERY_ID";
57  return "IRP_MN_QUERY_PNP_DEVICE_STATE";
59  return "IRP_MN_QUERY_BUS_INFORMATION";
61  return "IRP_MN_DEVICE_USAGE_NOTIFICATION";
63  return "IRP_MN_SURPRISE_REMOVAL";
65  return "IRP_MN_QUERY_LEGACY_BUS_INFORMATION";
66  default:
67  return "(unknown)IRP_MN";
68  }
69 }
70 
71 inline
72 PCHAR
75 {
76  switch (Type)
77  {
78  case BusRelations:
79  return "BusRelations";
80  case EjectionRelations:
81  return "EjectionRelations";
82  case RemovalRelations:
83  return "RemovalRelations";
85  return "TargetDeviceRelation";
86  default:
87  return "(unknown)Relation";
88  }
89 }
90 
91 inline
92 PCHAR
95 {
96  switch (Type)
97  {
98  case BusQueryDeviceID:
99  return "BusQueryDeviceID";
100  case BusQueryHardwareIDs:
101  return "BusQueryHardwareIDs";
103  return "BusQueryCompatibleIDs";
104  case BusQueryInstanceID:
105  return "BusQueryInstanceID";
107  return "BusQueryDeviceSerialNumber";
108  default:
109  return "(unknown)QueryID";
110  }
111 }
112 
113 #endif // _DBG_DRIVERDBG_H_
signed char * PCHAR
Definition: retypes.h:7
#define IRP_MN_CANCEL_REMOVE_DEVICE
enum _BUS_QUERY_ID_TYPE BUS_QUERY_ID_TYPE
#define IRP_MN_QUERY_RESOURCES
#define IRP_MN_REMOVE_DEVICE
#define IRP_MN_QUERY_ID
#define IRP_MN_FILTER_RESOURCE_REQUIREMENTS
#define IRP_MN_QUERY_RESOURCE_REQUIREMENTS
#define IRP_MN_WRITE_CONFIG
#define IRP_MN_QUERY_LEGACY_BUS_INFORMATION
Definition: iotypes.h:4427
#define IRP_MN_EJECT
#define IRP_MN_QUERY_REMOVE_DEVICE
_In_ UCHAR _In_ UCHAR MinorFunction
Definition: wdfdevice.h:1697
#define IRP_MN_READ_CONFIG
enum _DEVICE_RELATION_TYPE DEVICE_RELATION_TYPE
#define IRP_MN_QUERY_STOP_DEVICE
PCHAR DbgGetDeviceRelationString(DEVICE_RELATION_TYPE Type)
Definition: driverdbg.h:73
#define IRP_MN_SURPRISE_REMOVAL
Definition: ntifs_ex.h:408
#define IRP_MN_STOP_DEVICE
#define IRP_MN_START_DEVICE
Type
Definition: Type.h:6
#define IRP_MN_QUERY_DEVICE_TEXT
#define IRP_MN_QUERY_INTERFACE
#define IRP_MN_QUERY_BUS_INFORMATION
unsigned char UCHAR
Definition: xmlstorage.h:181
FORCEINLINE PCHAR GetIRPMinorFunctionString(UCHAR MinorFunction)
Definition: driverdbg.h:13
#define FORCEINLINE
Definition: wdftypes.h:67
#define IRP_MN_QUERY_DEVICE_RELATIONS
#define IRP_MN_SET_LOCK
#define IRP_MN_CANCEL_STOP_DEVICE
#define IRP_MN_DEVICE_USAGE_NOTIFICATION
#define IRP_MN_QUERY_PNP_DEVICE_STATE
PCHAR DbgGetDeviceIDString(BUS_QUERY_ID_TYPE Type)
Definition: driverdbg.h:93
#define IRP_MN_QUERY_CAPABILITIES