Method and system for exposing proprietary APIs in a privileged device driver to an application
First Claim
1. A method for interfacing an application program to provide access to functions comprising a device driver (device driver functions), said method comprising:
- assigning a unique identifier to each of said device driver functions;
providing an application wrapper program for said application program, said application wrapper program having at least one surrogate function for said application program to invoke, said surrogate function corresponding to one of said device driver functions;
providing a device driver wrapper program for said device driver;
extracting at least one parameter passed from said application program responsive to an invocation of one of said device driver functions by said application program through said surrogate function;
storing said at least one parameter in a data packet along with a unique corresponding message number;
sending said data packet to said device driver wrapper program;
determining in said device driver wrapper program a selected device driver function being invoked by said application program using said unique corresponding message number;
retrieving said at least one parameter from said data packet; and
invoking said selected device driver function.
1 Assignment
0 Petitions
Accused Products
Abstract
According to an embodiment of the present invention, a method for interfacing of application programs with operating system device drivers is provided. The method includes a variety of steps such as assigning an arbitrary message number to each of a plurality of functions from a device driver. Wrapper programs for the application and the device driver are provided. The method then includes a step of providing a ‘surrogate’ function for the application to call. Parameters passed into the function are extracted by the wrapper program for the application. The parameters are next stored into a data packet along with a corresponding message number. Next, the data packet is sent to the wrapper program for the device driver. In a subsequent step, the device driver wrapper program determines which function the application is invoking by the message, unpacks the parameters from the data packet and calls the corresponding function in the device driver. In many embodiments, data returned from the function is passed back through an analogous mechanism. The combination of these steps can provide an interface between the application and the device driver.
-
Citations
12 Claims
-
1. A method for interfacing an application program to provide access to functions comprising a device driver (device driver functions), said method comprising:
-
assigning a unique identifier to each of said device driver functions;
providing an application wrapper program for said application program, said application wrapper program having at least one surrogate function for said application program to invoke, said surrogate function corresponding to one of said device driver functions;
providing a device driver wrapper program for said device driver;
extracting at least one parameter passed from said application program responsive to an invocation of one of said device driver functions by said application program through said surrogate function;
storing said at least one parameter in a data packet along with a unique corresponding message number;
sending said data packet to said device driver wrapper program;
determining in said device driver wrapper program a selected device driver function being invoked by said application program using said unique corresponding message number;
retrieving said at least one parameter from said data packet; and
invoking said selected device driver function. - View Dependent Claims (2, 3, 4)
-
-
5. A computer program product for interfacing an application program to provide access to functions comprising a device driver (device driver functions), said computer program product comprising:
-
code for assigning a unique identifier to each of said device driver functions;
code for providing an application wrapper program for said application program, said application wrapper program having at least one surrogate function for said application program to invoke, said surrogate function corresponding to one of said device driver functions;
code for providing a device driver wrapper program for said device driver;
code for extracting at least one parameter passed from said application program responsive to an invocation of one of said device driver functions by said application program through said surrogate function;
code for storing said at least one parameter in a data packet along with unique corresponding message number;
code for sending said data packet to said device driver wrapper program;
code for determining in said device driver wrapper program a selected device driver function being invoked by said application program using said unique corresponding message number;
code for retrieving said at least one parameter from said data packet;
code for invoking said selected device driver function; and
a computer readable storage medium for holding said codes. - View Dependent Claims (6, 7, 8)
-
-
9. An apparatus for interfacing an application program to access functions comprising a device driver (device driver functions), said apparatus comprising:
-
a memory;
a system bus;
a processor, interconnected by said system bus to said memory, said processor operatively disposed to;
assign a unique identifier to each of said device driver functions;
provide an application wrapper program for said application program, said application wrapper program having at least one surrogate function for said application program to invoke, said surrogate function corresponding to one of said device driver functions;
provide a device driver wrapper program for said device driver;
extract at least one parameter passed from said application program responsive to an invocation of one of said device driver functions by said application program through said surrogate function;
store said at least one parameter in a data packet along with a unique corresponding message number;
send said data packet to said device driver wrapper program;
determine in said device driver wrapper program a selected device driver function being invoked by said application program using said unique corresponding message number;
retrieve said at least one parameter from said data packet; and
invoke said selected device driver function. - View Dependent Claims (10, 11, 12)
-
Specification