Load a library
If you are loading a 64-bit library in 64-bit Python (or a 32-bit library in
32-bit Python) then you can directly load the library using
LoadLibrary
.
Important
If you want to load a 32-bit library in 64-bit Python then inter-process communication is used to communicate with the 32-bit library. See Access a 32-bit library in 64-bit Python for more details.
All of the shared libraries in the following examples are included with the
MSL-LoadLib package. The C++ and FORTRAN
libraries have been compiled in 32- and 64-bit Windows and Linux and in 64-bit
macOS. The .NET library was complied in 32- and 64-bit using
Microsoft Visual Studio 2017. The kernel32 library is a 32-bit library and it
is only valid on Windows (since it uses the __stdcall
calling convention).
The LabVIEW library was built using 32- and 64-bit LabVIEW
on Windows. The Java libraries are platform and bitness
independent since they run in the JVM.
Tip
If the file extension is not specified then a default extension,
.dll
(Windows), .so
(Linux) or .dylib
(macOS) is used.