HTBasic Help
×
Menu
Index

DLL GET

 
The first command keyword is DLL GET, which sets up a Dynamic Link Library (DLL) function to use in the program. The syntax for this command is:
 
DLL GET "returntype dllname:functionname" AS "alias"
 
Where:
returntype is one of the following: VOID, SHORT, LONG, DOUBLE, CHAR, CHARPTR, VARIABLE.
dllname must be the name of a loaded DLL.
functionname is the name of the function in the DLL you wish to call, or a variable exported from the DLL.
(All Function/Variable names must use valid HTBasic function name conventions or an alias using HTBasic function name conventions must be provided. The DLL loader will allow you to load two functions with the same name as long as they are in different DLL’s. However, without an alias specified, there is no way to differentiate which DLL you are trying to call and the DLL loader will always call the first function by that name. You cannot have an HTBasic function with the same name as a DLL function.)
alias is an optional function/variable name to use within HTBasic.
 
Examples of this command include:
 
DLL GET "VOID Pipecalc:Xsection" AS "Cross"
DLL GET "SHORT Pipecalc:Xsection" AS "Cross"
DLL GET "LONG Pipecalc:Xsection" AS "Cross"
DLL GET "DOUBLE Pipecalc:Xsection" AS "Cross"
DLL GET "CHAR Pipecalc:Xsection" AS "Cross"
DLL GET "CHARPTR Pipecalc:Xsection" AS "Cross"
DLL GET "VARIABLE Pipecalc:Xsection" AS "Cross"
 
Both _cdecl type DLLs and _stdCall DLLs may be called with the DLL Toolkit. They syntax is:
 
DLL GET "STDCALL VOID DLL:FUNCTION" AS "ALIAS"
DLL GET "CDECL VOID DLL:FUNCTION" AS "ALIAS"
DLL GET "VOID DLL:FUNCTION" AS "ALIAS" ! defaults to cdecl