摘要 |
An application program comprising executable code is deployed in an RTE (Runtime Environment) comprising an interoperability bridge unit 405. A reference to a function, originally instructed in a system-independent programming language, is received from the executable code 450 and the reference resolved to determine the function name. The executable code is derived from an intermediate language code, e.g. bytecode. If the function name is located in an export portion of an executable library 465 registered with the RTE, typically a DLL (Dynamic Link Library) then program code, comprising a platform invoke statement referencing the library and function name, is dynamically generated, prepared and executed to invoke the function. A function code detector 415 receives the reference and a function locator resolves the reference to determine the function name. A code generator 435 dynamically generates program code 445 comprising the platform invoke statement for the function and this code is passed to a code implementer 455 which prepares the executable code. A static arrangement is also disclosed in which source code is parsed by a compiler. Program code containing a platform invoke statement for a function can then be generated and compiled to intermediate language code before run time. |