Calling DLL Functions on the Application Server

To support processes running on an application server, you can declare and call functions compiled in Microsoft Windows DLLs and in UNIX shared libraries (or shared objects, depending on the specific UNIX platform). You can do this either with a special PeopleCode declaration, or using the business interlink framework.

When you call out to a DLL using PeopleCode, on Microsoft Windows NT application servers, the DLL file has to be on the path. On UNIX application servers, the shared library file must be on the library path (as defined for the specific UNIX platform).

The PeopleCode declaration and function call syntax remains unchanged. For example, the following PeopleCode could be used to declare and call a function LogMsg in an external library Testdll.dll on a Microsoft Windows client or a Windows application server, or a libtestdll.so on an UNIX application server. The UNIX shared library’s extension varies by the specific UNIX platform.

Declare Function LogMsg Library "testdll" (string, string)
       Returns integer;

&res = LogMsg("\temp\test.log", "This is a test");