Windows API

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC 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 AsciizAS DWORD

DECLARE FUNCTION LoadLibraryW           LIB "Kernel32.dll" ALIAS "LoadLibraryW"         (lpLibFileName AS AsciizAS DWORD

DECLARE FUNCTION GetProcAddress         LIB "Kernel32.dll" ALIAS "GetProcAddress"       (BYVAL hModule AS DWORD, lpProcName AS ASCIIZAS 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.