<< Click to Display Table of Contents >> Navigation: ThinBASIC Core Language > Windows API |
Windows API
Windows useful API (Application Program Interface) SUB / FUNCTIONS.
In thinBasic you ca use any external classic DLL Windows API functions simply declaring the function like:
DECLARE FUNCTION LoadLibraryA LIB "Kernel32.dll" ALIAS "LoadLibraryA" (lpLibFileName AS Asciiz) AS DWORD
DECLARE FUNCTION LoadLibraryW LIB "Kernel32.dll" ALIAS "LoadLibraryW" (lpLibFileName AS Asciiz) AS DWORD
DECLARE FUNCTION GetProcAddress LIB "Kernel32.dll" ALIAS "GetProcAddress" (BYVAL hModule AS DWORD, lpProcName AS ASCIIZ) AS LONG
DECLARE FUNCTION FreeLibrary LIB "Kernel32.dll" ALIAS "FreeLibrary" (BYVAL hLibModule AS DWORD) AS LONG
After declaration, functions become part of the thinBasic language.
Anyway here you will find some API functions already built in thinBasic Core engine and ready to be used without any declaration.
All native build in Windows API functions will have WIN_ as leading characters in the name.