Provide Implementation Environment

From Apache OpenOffice Wiki
Jump to: navigation, search

The function called component_getImplementationEnvironment() tells the shared library component loader which compiler was used to build the library. This information is required if different components have been compiled with different compilers. A specific C++-compiler is called an environment. If different compilers were used, the loader has to bridge interfaces from one compiler environment to another, building the infrastructure of communication between those objects. It is mandatory to have the appropriate C++ bridges installed into the UNO runtime. In most cases, the function mentioned above can be implemented this way:

  extern "C" void SAL_CALL component_getImplementationEnvironment(
      sal_Char const ** ppEnvTypeName, uno_Environment ** ppEnv )

The macro CPPU_CURRENT_LANGUAGE_BINDING_NAME is a C string defined by the compiling environment, if you use the SDK compiling environment. For example, when compiling with the Microsoft Visual C++ compiler, it defines to "msci", but when compiling with the GNU gcc 3, it defines to "gcc3".

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages