Calls binary function with exported name passed as first parameter, DLL-file name, where this function defined, – as second parameter. The rest parameters are passed to this function. If any parameter is number (integer or floating-point), it is passed directly. If any parameter is pointer, it is passed as integer, containing memory block address, it points to. Structures that are passed by value are passed in the following order: each structure field is passed as separate parameter, beginning from the first field to the last. Function result is the result of called binary function.
This function loads specified library, calls specified function and unloads library. You can manually load and unload any library using LoadLibrary function, then get pointers to any needed function using GetProcAddress function and call them using CALL function, passing their addresses. When you finished working with library, call FreeLibrary function using CALL function as well.
Warning! In case of ambiguity of parameter type, (for example, you pass number as string), number will be passed as number, not as string. Set parameter type to be fixed string type to avoid automatic type conversion.
Example:
(CALLAPI “MessageBoxA” “User32.dll” 0 “Hello World” “Lisp program” 0)