RunDiagnostics()
service runs diagnostics on the controller a driver is managing or a child the driver has produced. This service is not allowed to use any of the consoleI/O-related protocols. Instead, the results of the diagnostics are returned to the caller in a buffer. The caller may choose to log the results or display them. The example below shows an empty implementation of the RunDiagnostics()
service for the Driver Diagnostics 2 Protocol. The recommended implementation style shown allows the same RunDiagnostics()
service implementation to be shared between the Driver Diagnostics Protocol and the Driver Diagnostics 2 Protocol.NULL
-terminated Unicode string so the caller of the RunDiagnostics()
service can display a human-readable diagnostic result. ErrorType is a GUID that defines the format of the data buffer following the NULL
-terminated Unicode string. BufferSize is the size of Buffer that includes the NULL
-terminated Unicode string and the GUID-specific data buffer. The implementation of RunDiagnostics()
must allocate Buffer using the service AllocatePool()
, and it is the caller's responsibility to free this buffer with FreePool()
.