Liberty BASIC Help Online

What are APIs/DLLs?
API stands for Application Programming Interface.  Windows APIs are the function calls that are the fundamental building blocks of Windows programming.  Although the term "API" actually refers to the complete set of function calls, it is also often applied to just a single defined function call of the entire API.  So it is often said, "I made an API call," or, "I want my program to call an API that does such and such..."
Each and every time Windows is loaded, or whenever Windows programs are run, many API calls are made.  There are API calls that manage memory, create and destroy windows, read keyboard and mouse actions, draw graphics, and much more.  Liberty BASIC makes many of these API calls behind the scenes in programs.
However, in the context of the BASIC language, it would be a tall order (and largely unnecessary) to create BASIC-like statements and functions to implement every Windows API call.  So for those who already have a working knowledge and for those willing to study and learn about such things, Liberty BASIC has implemented a way to call most Windows APIs.
A complete reference of the Windows API set is not included with this copy of Liberty BASIC.  To supply this documentation would require the inclusion of a very thick book.  Some example programs are included with the Liberty BASIC distribution.
What are DLLs?
DLL stands for Dynamic-Link-Library.  A DLL is a file containing executable code, like an EXE or COM file.  Instead of containing a complete program, a DLL contains functions that can be used by other programs.  These functions might contain code to provide services not built into Windows, for example the ability to perform some kind of data compression.  A Windows program uses these functions after it begins executing.  It does this by opening the DLL file and calling functions from it.  The programmer must already know what these functions are when the program's code is written.
Each DLL has its own Application Programming Interface (again API) that specifies how to make calls to its functions, and in fact, Windows APIs are functions within DLLs that are supplied with Windows.  When calling an API from within Liberty BASIC it is necessary to open the appropriate DLL before making the call.
See also:  CALLDLL, STRUCT, Using Types with CALLDLL

Copyright (C) 2003 Shoptalk Systems
Liberty BASIC -