# US 9,519,600 B2 · Driver shimming

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 9,519,600 B2
- Document ID: US9519600B2
- Status: Granted
- Kind: B2
- Application number: 13/040,847
- Filed: 2011-03-04
- Published: 2012-09-06
- Granted: 2016-12-13
- Earliest claimed: 2011-03-04
- Assignees: Microsoft Technology Licensing, LLC
- Applicants: Corneliu I. Lupu; Silviu C. Calinoiu; Cristian G. Petruta; Batsaihan Jargalsaihan; Chris Ernest Matichuk
- Inventors: Corneliu I. Lupu; Silviu C. Calinoiu; Cristian G. Petruta; Batsaihan Jargalsaihan; Chris Ernest Matichuk
- Web page: https://patentgrep.com/patent/US9519600B2

## CPC

- G06F 13/20: for access to input/output bus
- G06F 9/44: Arrangements for executing specific programs
- G06F 9/4411: {Configuring for operating with peripheral devices; Loading of device drivers}
- G06F 9/455: Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Driver shimming techniques are described. In one or more implementations, an identification is made as to which interfaces and callbacks are utilized by a shim obtained for a driver of a computing device. The identified interfaces and callbacks are wrapped by the shim of the computing device such that calls to the wrapped interfaces and callbacks are intercepted by the shim.

## Claims

### Claim 1

A method comprising:
for a computing device having a first operating system, the first operating system including a kernel, updating the first operating system to a second operating system, the second operating system including a kernel, the first operating system being a previous version of the second operating system;
obtaining a shim configured to enable communication between the second operating system and a driver, the driver being configured to communicate with the kernel of the first operating system in at least a manner that does not involve an a application programming interface associated with the first operating system, the driver being compatible with the first operating system, but incompatible with the second operating system absent the shim; and
routing communication between the second operating system and the driver through the obtained shim, including using the obtained shim to correct incompatibilities between the driver and the kernel of the second operating system by using the obtained shim to intercept at least some data that is used to support communication from the kernel of the second operating system to the driver without involving an application programming interface associated with the second operating system, translating at least some of the intercepted data, and providing at least some of the translated data to the driver.

### Claim 2 (depends on 1)

A method as described in claim 1, wherein the driver is also configured to communicate with the first operating system via a call to an application programming interface associated with the first operating system and wherein routing communication between the second operating system and the driver further includes using the obtained shim to modify both an input and output of the application programming interface call.

### Claim 3 (depends on 1)

A method as described in claim 1, further comprising a shim engine installing the shim but then being excluded in execution of the driver after installing the shim.

### Claim 4 (depends on 1)

A method as described in claim 1, wherein the driver is further configured to communicate with the first operating system via a call to an application programming interface (API) associated with the first operating system and wherein the communication between the second operating system and the driver further comprises communications via an application programming interface (API).

### Claim 5 (depends on 4)

A method as described in claim 4, further comprising replacing import address table (IAT) entries of one or more application programming interfaces and saving the replaced import address table (IAT) entries in a hooking table.

### Claim 6 (depends on 1)

A method as described in claim 1, wherein the data that is used to support communication from the kernel of the second operating system to the driver without involving an application programming interface associated with the second operating system involves the use of I/O request packets (IRP).

### Claim 7 (depends on 6)

A method as described in claim 6, further comprising replacing entries in a dispatch table for use in conjunction with the I/O request packets (IRPs) to allow the obtained shim to intercept the I/O request packets.

### Claim 8 (depends on 1)

A method as described in claim 1, further comprising routing through the shim communications between another driver that is executable on the computing device and the driver.

### Claim 9 (depends on 1)

A method as described in claim 1, further comprising:
capturing data via one or more hooks;
translating the data to mimic an earlier version of an operating system; and
communicating the translated data to the driver.

### Claim 10 (depends on 1)

A method as described in claim 1, wherein obtaining a shim comprises obtaining a shim via a network connection from a service provider that includes a repository responsive to communication of an identifier of the driver that is to be installed on the computing device.

### Claim 11

A computing device comprising:
one or more processors; and
one or more computer readable storage media storing instructions thereon that are executable by the one or more processors to:
update a first operating system on the computing device to a second operating system, the first operating system being a previous version of the second operating system, the first operating system having a kernel and the second operating system having a kernel;
initiate installation of a driver that is compatible with the first operating system on the computing device, the driver being configured to communicate with the kernel of the first operating system in at least a manner that does not involve an application programming interface associated with the first operating system;
identify the driver to be installed;
based at least on the identification, determine whether the driver has compatibility issues with the second operating system;
based at least on a determination that the driver has compatibility issues with the second operating system, determine whether a shim is available for the driver;
based at least on a determination that a shim is available, obtain the determined shim for installation on the computing device; and
install the shim on the computing device, thereby enabling the driver to communicate with the second operating system by routing communication between the second operating system and the driver through the shim, the shim correcting incompatibilities between the driver and the kernel of the second operating system by intercepting data used to support communication from the kernel of the second operating system to the driver without involving an application programming interface associated with the second operating system, translating at least some of the intercepted data, and providing at least some of the translated data to the driver.

### Claim 12 (depends on 11)

A computing device as described in claim 11, wherein the data that is used to support communication from kernel of the second operating system to the driver without involving an application programming interface associated with the second operating system involves the use of I/O request packets (IRPs) and wherein the one or more computer readable storage media store instructions thereon that are executable by the one or more processors to modify a dispatch table so that the shim can intercept the I/O request packets (IRPs).

### Claim 13 (depends on 11)

A computing device as described in claim 11, wherein the shim also corrects incompatibilities between the driver and an application programming interface (API) associated with the second operating system and wherein the one or more computer readable storage media store instructions thereon that are executable by the one or more processors to modify an import access table (IAT) so that the shim can intercept calls to the application programming interface (API).

### Claim 14 (depends on 11)

A computing device as described in claim 11, wherein the data that is used to support communication from the kernel of the second operating system to the driver without involving an application programming interface associated with the second operating system involves the use of I/O request packets (IRPs) and wherein the one or more computer readable storage media store instructions thereon that are executable by the one or more processors to:
intercept the I/O request packets (IRPs) that relate to communication with the driver;
translate at least some of the data associated with the intercepted I/O request packet (IRP) to be compatible with the driver; and
provide at least some of the translated data for communication to the driver.

### Claim 15

One or more computer readable storage media storing instructions thereon that when executed by one or more processors cause a computing system to:
update a first operating system on the computing device to a second operating system, the first operating system being a previous version of the second operating system, the first operating system having a kernel and the second operating system having a kernel;
initiate installation of a driver that is compatible with the first operating system on the computing device, the driver being configured to communicate with the kernel of the first operating system in at least a manner that does not involve an application programming interface associated with the first operating system;
identify the driver to be installed;
based at least on the identification, determine whether the driver has compatibility issues with the second operating system;
based at least on a determination that the driver has compatibility issues with the second operating system, determine whether a shim is available for the driver;
based at least on a determination that a shim is available, obtain the determined shim for installation on the computing device; and
install the shim on the computing device, thereby enabling the driver to communicate with the second operating system by routing communication between the second operating system and the driver through the shim, the shim correcting incompatibilities between the driver and the kernel of the second operating system by intercepting data used to support communication from the kernel of the second operating system to the driver without involving an application programming interface associated with the second operating system, translating at least some of the intercepted data, and providing at least some of the translated data to the driver.

### Claim 16 (depends on 15)

One or more computer readable storage media as described in claim 15, wherein the data that is used to support communication from the kernel of the second operating system to the driver without involving an application programming interface associated with the second operating system involves the use of I/O request packets (IRPs) and wherein the one or more computer readable storage media store instructions thereon that are executable by one or more processors to modify a dispatch table so that the shim can intercept the I/O request packets (IRPs).

### Claim 17 (depends on 15)

One or more computer readable storage media as described in claim 15, wherein the shim also corrects incompatibilities between the driver and an application programming interface (API) associated with the second operating system and wherein the one or more computer readable storage media stores instructions thereon that are executable by one or more processors to modify an import access table (IAT) so that the shim can intercept calls to the application programming interface (API).

### Claim 18 (depends on 15)

One or more computer readable storage media as described in claim 15, wherein the data that is used to support communication from the kernel of the second operating system to the driver without involving an application programming interface associated with the second operating system involves the use of I/O request packets (IRPs) and wherein the one or more computer readable storage media stores instructions thereon that are executable by one or more processors to:
intercept the I/O request packets (IRPs) that relate to communication with the driver;
translate at least some of the data associated with the intercepted I/O request packet (IRP) to be compatible with the driver; and
provide at least some of the translated data for communication to the driver.

### Claim 19 (depends on 15)

One or more computer readable storage media as described in claim 15, wherein the one or more computer readable storage media stores instructions thereon that are executable by one or more processors to translate, through the execution of the shim, data that is involved in a callback to the driver.

### Claim 20 (depends on 15)

One or more computer readable storage media as described in claim 15, wherein the shim also intercepts data that is used to support communication from the kernel of the second operating system to the driver that does involve a call to an application programming interface.
