Call a function in a shared library: Difference between revisions

Content added Content deleted
Line 24: Line 24:
-- There are ready to use Win32 bindings. We don't want to use them here.
-- There are ready to use Win32 bindings. We don't want to use them here.
--
--
type HANDLE is new Unsigned_32; -- on MSWindows x64, replace by Unsigned_64 to make it work
type HANDLE is new Unsigned_32; -- on x64 system, replace by Unsigned_64 to make it work
function LoadLibrary (lpFileName : char_array) return HANDLE;
function LoadLibrary (lpFileName : char_array) return HANDLE;
pragma Import (stdcall, LoadLibrary, "LoadLibrary", "_LoadLibraryA"); -- Ada95 does not have the @n suffix.
pragma Import (stdcall, LoadLibrary, "LoadLibrary", "_LoadLibraryA"); -- Ada95 does not have the @n suffix.