METHOD, APPARATUS, AND COMPUTER PROGRAM PRODUCT FOR REPLACING A DYNAMIC LINK LIBRARY (DLL) OF A FIRST COMPUTING ENVIRONMENT WITH A DLL OF A SECOND COMPUTING ENVIRONMENT THAT CAN BE INVOKED FROM THE FIRST COMPUTING ENVIRONMENT IN A TRANSPARENT MANNER
First Claim
1. A method for replacing a dynamic link library (DLL) of a first computing environment, which first DLL comprises a plurality of exported procedures and a directory that provides information concerning the exported procedures, each exported procedure having an interface, with a second DLL capable of executing in a second computing environment and capable of being called by an application executing in the first computing environment, said method comprising(a) generating, in the second computing environment, based on the information in the directory of the first DLL, a second DLL comprising a plurality of exported procedures each having an interface that is identical to the interface of a corresponding exported procedure in the first DLL but comprising native code of the second computing environment;
- and (b) linking an application executing in the first computing environment that contains calls to the exported procedures of the first DLL, to the corresponding exported procedures of the second DLL in the second computing environment in a manner that is transparent to the calling application.
12 Assignments
0 Petitions
Accused Products
Abstract
A first dynamic link library (DLL) of a first computing environment, which exports one or more procedures that an application program executing in the first computing environment can call, is replaced with a second DLL that executes in a second computing environment, in a manner that is transparent to the calling application. A source code skeleton of the second DLL is automatically generated based on information contained in a directory of the compiled object code of the first DLL. The exported procedures of the second DLL have interfaces that are identical (from the perspective of the calling application) to the interfaces of the corresponding exported procedures of the first DLL, but the exported procedures of the second DLL comprise native code of the second computing environment. The calling application executing in the first computing environment is the linked dynamically to the exported procedures of the second DLL in the second computing environment in a manner that is transparent to the calling application.
-
Citations
14 Claims
-
1. A method for replacing a dynamic link library (DLL) of a first computing environment, which first DLL comprises a plurality of exported procedures and a directory that provides information concerning the exported procedures, each exported procedure having an interface, with a second DLL capable of executing in a second computing environment and capable of being called by an application executing in the first computing environment, said method comprising
(a) generating, in the second computing environment, based on the information in the directory of the first DLL, a second DLL comprising a plurality of exported procedures each having an interface that is identical to the interface of a corresponding exported procedure in the first DLL but comprising native code of the second computing environment; - and
(b) linking an application executing in the first computing environment that contains calls to the exported procedures of the first DLL, to the corresponding exported procedures of the second DLL in the second computing environment in a manner that is transparent to the calling application. - View Dependent Claims (2, 3, 4)
(a1) retrieving from the directory of the first DLL information concerning each of its exported procedures; and
(a2) generating a skeleton of said second DLL from the information retrieved from the directory of the first DLL, said skeleton of said second DLL comprising, for each procedure exported by the first DLL;
a parameter matching routine that, when invoked, verifies whether a calling application in the first computing environment was compiled with an interface description for the exported procedure that matches a corresponding interface description for that exported procedure in said second DLL;
an interface jacket routine that maps arguments of the exported procedure supplied by a calling application in the first computing environment into corresponding arguments that can be manipulated properly by said second DLL in the second computing environment; and
a prototype declaration for the exported procedure;
(a3) inserting native program code of the second computing environment in the generated second DLL to define the functionality of each exported procedure of the second DLL within the second computing environment; and
(a4) compiling the generated second DLL in the second computing environment.
- and
-
3. The method recited in claim 2, wherein said linking step comprises:
-
(b1) locating and loading the second DLL in the second computing environment;
(b2) invoking the parameter matching routine for each exported procedure of the second DLL that is imported by the calling application; and
(b3) if the parameter matching routine executes successfully, replacing an entry point in the first computing environment for the exported procedure of the first DLL with an entry point of the corresponding exported procedure in the second DLL.
-
-
4. The method recited in claim 1, wherein the first computing environment is emulated within the second computing environment.
-
5. Apparatus for replacing a dynamic link library (DLL) of a first computing environment, which first DLL comprises a plurality of exported procedures and a directory that provides information concerning the exported procedures, each exported procedure having an interface, with a second DLL capable of executing in a second computing environment and capable of being called by an application executing in the first computing environment, said apparatus comprising
(a) a code generator that generates, in the second computing environment, based on the information in the directory of the first DLL, a second DLL comprising a plurality of exported procedures each having an interface that is identical to the interface of a corresponding exported procedure in the first DLL but comprising native code of the second computing environment; - and
(b) a linker that links an application executing in the first computing environment that contains calls to the exported procedures of the first DLL, to the corresponding exported procedures of the second DLL in the second computing environment in a manner that is transparent to the calling application. - View Dependent Claims (6, 7, 8)
means for retrieving from the directory of the first DLL information concerning each of its exported procedures; and
means for generating a skeleton of said second DLL from the information retrieved from the directory of the first DLL, said skeleton of said second DLL comprising, for each procedure exported by the first DLL;
a parameter matching routine that, when invoked, verifies whether a calling application in the first computing environment was compiled with an interface description for the exported procedure that matches a corresponding interface description for that exported procedure in said second DLL;
an interface jacket routine that maps arguments of the exported procedure supplied by a calling application in the first computing environment into corresponding arguments that can be manipulated properly by said second DLL in the second computing environment; and
a prototype declaration for the exported procedure.
- and
-
7. The apparatus recited in claim 6, wherein said linker locates and loads the second DLL in the second computing environment, invokes the parameter matching routine for each exported procedure of the second DLL that is imported by the calling application, and if the parameter matching routine executes successfully, replaces an entry point in the first computing environment for the exported procedure of the first DLL with an entry point of the corresponding exported procedure in the second DLL.
-
8. The apparatus recited in claim 5, wherein the first computing environment is emulated within the second computing environment.
-
9. A computer-readable medium having program code stored thereon that facilitates replacement of a dynamic link library (DLL) of a first computing environment, which first DLL comprises a plurality of exported procedures and a directory that provides information concerning the exported procedures, each exported procedure having an interface, with a second DLL capable of executing in a second computing environment and capable of being called by an application executing in the first computing environment, said program code, when executed, causing the following steps to be performed:
-
(a) generating, in the second computing environment, based on the information in the directory of the first DLL, a second DLL comprising a plurality of exported procedures each having an interface that is identical to the interface of a corresponding exported procedure in the first DLL but comprising native code of the second computing environment; and
(b) linking an application executing in the first computing environment that contains calls to the exported procedures of the first DLL, to the corresponding exported procedures of the second DLL in the second computing environment in a manner that is transparent to the calling application. - View Dependent Claims (10, 11, 12)
(a1) retrieving from the directory of the first DLL information concerning each of its exported procedures; and
(a2) generating a skeleton of said second DLL from the information retrieved from the directory of the first DLL, said skeleton of said second DLL comprising, for each procedure exported by the first DLL;
a parameter matching routine that, when invoked, verifies whether a calling application in the first computing environment was compiled with an interface description for the exported procedure that matches a corresponding interface description for that exported procedure in said second DLL;
an interface jacket routine that maps arguments of the exported procedure supplied by a calling application in the first computing environment into corresponding arguments that can be manipulated properly by said second DLL in the second computing environment; and
a prototype declaration for the exported procedure.
-
-
11. The method recited in claim 10, wherein said program code causes, in said linking step, the following steps to be performed:
-
(b1) locating and loading the second DLL in the second computing environment;
(b2) invoking the parameter matching routine for each exported procedure of the second DLL that is imported by the calling application; and
(b3) if the parameter matching routine executes successfully, replacing an entry point in the first computing environment for the exported procedure of the first DLL with an entry point of the corresponding exported procedure in the second DLL.
-
-
12. The computer-readable medium recited in claim 9, wherein the first computing environment is emulated within the second computing environment, and wherein said program code executes in the second computing environment.
-
13. A method for generating, from a compiled dynamic link library code file of a first computing environment, a source code skeleton of a second dynamic link library (DLL) executable in a second computing environment and that can be linked to a calling application executing in the first computing environment as a replacement for the compiled dynamic link library code file of the first computing environment, wherein the compiled dynamic link library code file comprises a plurality of exported procedures, each having a defined interface, and a directory that provides information concerning each of the exported procedures, said method comprising:
-
(a) extracting from the directory of the compiled dynamic link library code file the information concerning each of its exported procedures; and
(b) based on the extracted information, generating for each procedure exported by the compiled dynamic link library code file, as part of said source code skeleton of said second DLL;
a parameter matching routine that, when invoked, verifies whether a calling application in the first computing environment was compiled with an interface description for the exported procedure that matches a corresponding interface description for that exported procedure in said second DLL;
an interface jacket routine that maps arguments of the exported procedure supplied by the calling application in the first computing environment into corresponding arguments that can be manipulated properly by said second DLL in the second computing environment; and
a prototype declaration for the exported procedure.
-
-
14. A computer-readable medium having program code stored thereon for generating, from a compiled dynamic link library code file of a first computing environment, a source code skeleton of a second dynamic link library (DLL) executable in a second computing environment and that can be linked to a calling application executing in the first computing environment as a replacement for the compiled dynamic link library code file of the first computing environment, wherein the compiled dynamic link library code file comprises a plurality of exported procedures, each having a defined interface, and a directory that provides information concerning each of the exported procedures, said program code, when executed, causing the following steps to be performed:
-
(a) extracting from the directory of the compiled dynamic link library code file the information concerning each of its exported procedures; and
(b) based on the extracted information, generating for each procedure exported by the compiled dynamic link library code file, as part of said source code skeleton of said second DLL;
a parameter matching routine that, when invoked, verifies whether a calling application in the first computing environment was compiled with an interface description for the exported procedure that matches a corresponding interface description for that exported procedure in said second DLL;
an interface jacket routine that maps arguments of the exported procedure supplied by the calling application in the first computing environment into corresponding arguments that can be manipulated properly by said second DLL in the second computing environment; and
a prototype declaration for the exported procedure.
-
Specification