发明名称 Software Interface for dynamic API mapping
摘要 A method, apparatus, and article of manufacture for a software interface for dynamic API mapping. The method comprises the steps of identifying the libraries required by the API by determining which program environment the API is operating in, scanning to detect and select libraries available to the determined program environment, dynamically loading the selected libraries, dynamically loading the selected libraries into the application, and binding the selected libraries to the associated API function call.The present invention allows a single binary application to transparently work with different libraries that provide a common or overlapping API set. This is accomplished by linking the application with a separate library that provides a dynamic API mapping facility. A function in this library is invoked when the application begins execution. The application's system is scanned to determine which libraries are available. If more than one choice is available, the dynamic API mapping facility will heuristically determine which library or libraries to use. An environment variable can also be used to force the application to use a specific set of libraries when more than one choice is available. When an appropriate library is determined, it is dynamically loaded into the process, and scanned for each supported API function. When a function is found, a pointer to that function will be bound to a global function pointer named to reflect the corresponding API. Each function pointer has as its default value, a pointer to a default function that returns an appropriate error if called. Once each of the API functions has been mapped, the application can run without the need to be aware of the different libraries to which it is linked. The same binary application can run on a system with any library or set of libraries that provides the appropriate API set.
申请公布号 US6253257(B1) 申请公布日期 2001.06.26
申请号 US19970904401 申请日期 1997.07.31
申请人 BEA SYSTEMS, INC. 发明人 DUNDON JACK P.
分类号 G06F9/445;G06F9/46;(IPC1-7):G06F9/00 主分类号 G06F9/445
代理机构 代理人
主权项
地址