MCPcopy Create free account
hub / github.com/NullArray/WinKernel-Resources / DumpDeviceClass

Function DumpDeviceClass

Drivers/Driver-SRC/setup/devcon/dump.cpp:114–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114BOOL DumpDeviceClass(_In_ HDEVINFO Devs, _In_ PSP_DEVINFO_DATA DevInfo)
115/*++
116
117Routine Description:
118
119 Write device class information to stdout
120
121Arguments:
122
123 Devs )_ uniquely identify device
124 DevInfo )
125
126Return Value:
127
128 TRUE if success
129
130--*/
131{
132 LPTSTR cls;
133 LPTSTR guid;
134
135 Padding(1);
136 cls = GetDeviceStringProperty(Devs,DevInfo,SPDRP_CLASS);
137 guid = GetDeviceStringProperty(Devs,DevInfo,SPDRP_CLASSGUID);
138 if(!cls && !guid) {
139 FormatToStream(stdout,
140 MSG_DUMP_NOSETUPCLASS
141 );
142 } else {
143 FormatToStream(stdout,
144 MSG_DUMP_SETUPCLASS,
145 guid ? guid : TEXT("{}"),
146 cls ? cls : TEXT("(?)")
147 );
148 }
149
150 if(cls) {
151 delete [] cls;
152 }
153 if(guid) {
154 delete [] guid;
155 }
156
157 return TRUE;
158}
159
160BOOL DumpDeviceStatus(_In_ HDEVINFO Devs, _In_ PSP_DEVINFO_DATA DevInfo)
161/*++

Callers 1

FindCallbackFunction · 0.85

Calls 3

PaddingFunction · 0.85
GetDeviceStringPropertyFunction · 0.85
FormatToStreamFunction · 0.85

Tested by

no test coverage detected