Specifications
Remote Control and Receiver-Transceiver Specifications and Requirements
for Windows Media Center in Windows Operating Systems
140
CIR Port Device Initialization
As previously described, each CIR Port device will be loaded as a result of its device being
enumerated by the underlying bus driver. For example, the Microsoft-supplied USBCIR devices
are enumerated by the USBHUB driver.
Device Interface Registration and Enabling
As each CIR Port driver identifies an instance of a device it supports, it creates whatever FDOs it
requires. For each instance of an IR interface, each CIR Port driver must register and enable a
device interface using the GUID GUID_DEVINTERFACE_IRPORT.
It is important to note that a CIR Port driver should not enable this interface until its interface is
ready for use and it is ready and willing to receive requests from CIRClass. If a CIR Port driver
needs to delay between device discovery and enumeration and the device's ready state (to
POST the device, download microcode, interrogate or calibrate the device, and so on), it should
delay enabling its device interface until its device is ready to receive requests.
GUID_DEVICEINTERFACE_IRPORT is defined as follows:
// {064F8C82-77B2-445e-B85D-C4E20F942FE1}
DEFINE_GUID(GUID_DEVINTERFACE_IRPORT,
0x64f8c82, 0x77b2, 0x445e, 0xb8, 0x5d, 0xc4, 0xe2, 0xf, 0x94, 0x2f, 0xe1);
CIRClass Handshaking with CIR Port Drivers
When CIRClass discovers an instance of a CIR Port device as a result of its device interface
being enabled, CIRClass will send a handshake IOCTL (IOCTL_IR_HANDSHAKE) to the newly-
created port device object instance. This IOCTL informs the CIR Port driver that its device has
been detected by CIRClass.
On receiving the IOCTL_IR_HANDSHAKE, the CIR Port driver must complete the request. When
this IOCTL is completed, CIRClass may start immediately sending IR-related requests to the new
CIR Port device instance. Note that a CIR Port driver may not delay completion of the
IOCTL_IR_HANDSHAKE IRP. This IRP must be completed immediately and synchronously
when received by IRPORT. If a CIR Port driver needs to delay before it is ready to receive
requests from CIRClass, it should delay enabling its device interface.
If the handshake operation fails, CIRClass will log an error and disregard that CIR Port device
instance.
Successful completion of the handshake signals a completed binding between CIRClass and a
given CIR Port device instance.
Device Capabilities for Version2 DDI
When CIRClass or other upper-level software requires the capabilities of the IR receiver, it sends
an IOCTL_IR_GET_DEV_CAPS request to the port driver. On receipt of this IRP, the port driver
must fill in the specific hardware capabilities and complete the IRP.
Because backward compatibility is required, a version 2 port driver may need to fill in a version 1
capabilities structure. Likewise, a version 1 port driver is required to (partially) fill in a version 2
capabilities structure.










