VARKON Version 1.15 1997-10-24
call_dll_function - Procedure
Calls a dll function
Description
Calls a function in a previousley loaded dll (Dynamic Link Library). This procedure makes it possible to call programs written in other languages from MBS and optionally pass upp to 3 string parameters as input.
call_dll_function() is only useful in VARKON for Windows95. MBS-programs including the call_dll_function() will compile and run without errors on all platforms but not actually call a function on other platforms than Windows95/NT.
Syntax
call_dll_function(dll, func, str1, str2, str3)
STRING dll STRING func; STRING str1, str2, str3;
Principal parameters
dll - The name (and path) of the dll library file. Name must be given in exactly the same way as when the library was loaded. Case is significant. func - The name of the function in the dll to call.
Optional parameters
str1 - A string (char * in C) that will be sent as parameter 1 to func. str2 - A string (char * in C) that will be sent as parameter 2 to func. str3 - A string (char * in C) that will be sent as parameter 3 to func.
Examples
call_dll_function("C:\MYLIB\MYDLL.DLL", "my_func");
Calls the my_func function in the MYDLL library previousley loaded from the C:\MYLIB directory. No input is specified.
call_dll_function("C:\MYLIB\MYDLL.DLL", "my_func", "my_input");
Calls the same function but with the adress of the string "my_input" as input.
Comments
Naming conventions for functions in dll's differ between different programming languages. Consult your documentation to find out what name to use.
No return value is expected from the called function.