IRP_MJ_SYSTEM_CONTROL (Serial)

The IRP_MJ_SYSTEM_CONTROL request supports WMI requests.

When Sent

A WMI kernel-mode component can send an IRP_MJ_SYSTEM_CONTROL request any time after Serial registers as a WMI provider for a serial device. WMI IRPs typically are sent when a user-mode data consumer has requested WMI data.

Input Parameters

Request specific

Output Parameters

Request specific

I/O Status Block

For WMI requests, Serial sets the Status field to one of the following values:

STATUS_SUCCESS

The request completed successfully.

STATUS_BUFFER_TOO_SMALL

The size, in bytes, of the output buffer is less than the required size of the requested information.

STATUS_INSUFFICIENT_RESOURCES

There were insufficient system resources to save the serial port name.

STATUS_INVALID_DEVICE_REQUEST

The request is not valid.

STATUS_WMI_GUID_NOT_FOUND

The WMI GUID is not supported.

Operation

Serial uses WmiSystemControl to handle WMI system control requests. Serial registers the following types of WMI library callback routines, which WmiSystemControl calls to handle WMI requests sent to a device:

DpWmiQueryReginfo

DpWmiQueryDataBlock

DpWmiSetDataBlock

DpWmiSetDataItem

Serial does not support any other system control requests. For non-WMI requests, Serial skips the current stack location, and sends the request down the device stack.

Serial registers the WMI GUIDS described in the following table.

Serial WMI GUIDAssociated data structure

SERIAL_PORT_WMI_NAME_GUID

USHORT followed by a WCSTR

SERIAL_PORT_WMI_COMM_GUID

SERIAL_WMI_COMM_DATA

SERIAL_PORT_WMI_HW_GUID

SERIAL_WMI_HW_DATA

SERIAL_PORT_WMI_PERF_GUID

SERIAL_WMI_PERF_DATA

SERIAL_PORT_WMI_PROPERTIES_GUID

WMI_SERIAL_PORT_PROPERTIES

 

The WMI name of a serial device is the value of the entry value PortName under the Plug and Play registry key for the device.

Requirements

Header

Wdm.h (include Wdm.h or Ntddk.h)

See also

DpWmiQueryReginfo
DpWmiQueryDataBlock
DpWmiSetDataBlock
DpWmiSetDataItem

 

 

Send comments about this topic to Microsoft

Show: