To create a DESC object representing a routine from a DLL, use a declaration such as:
your_routine: DLL_32_ROUTINE
where your_routine should be replaced by whatever name you have chosen to denote the routine in your software, and execute a creation instruction of the form:
create your_routine.make_by_name (
your_dll,
"your_routine_name",
<<argtyp1, argtyp2, ...>>,
res_type)
or, if you prefer for faster access to identify the routine by an integer index rather than a name:
create
your_routine.make_by_index
(
your_dll,
your_routine_index, -- The only differing line
<<argtyp1, argtyp2, ...>>,
res_type)
After either call has been executed, the boolean value your_routine.meaningful will be true if and only if the creation has been successful, that is to say, the given name or index did correspond to a routine of the library, and it was possible to open it. If the value is false, you can have more details about the error by comparing the value of your_routine.error_code, an integer, to those of constants attributes defined in class SHARED_LIBRARY_CONSTANTS.