ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Tools / WDAPI
  • Overview
  • See the list of functions, structures and constants of Windows APIs
  • Generating and using the WLanguage code required to use a Windows API
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
WDAPI: Using the APIs in a WINDEV application
Overview
The two most interesting features of WDAPI are:
  • the ability to consult the list of functions, structures and constants of the Windows API.
  • the ability to get the corresponding WLanguage syntax for the functions and the constants.
These features are available in the "Functions", "Structures" and "Constants" panes of WDAPI.
Reminder: WDAPI can be started from WDTool: on the "Tools" tab, in the "Utilities" group, click "WDTool".
See the list of functions, structures and constants of Windows APIs
To find a function, a constant or a structure:
  1. Position on the requested pane ("Functions", "Structures" or "Constants").
  2. Click the magnifier found in the header of the column named "Function name" (or "Structure name" or "Constant name").
  3. Type the first letters of the name of function, constant or structure. The table is automatically positioned on the element whose name is the nearest to the one typed.
Example: When you type "Move" in the "Functions" pane, the list will be positioned on the functions whose name starts with "Move".
Generating and using the WLanguage code required to use a Windows API
To generate and use the WLanguage code corresponding to the Windows API:
  1. Select the function or structure of the Windows API that will be used in WLanguage.
  2. WDAPI automatically generates the WLanguage code required to use the API function or structure.
    If the API function requires the use of one or more structures, WDAPI automatically generates the WLanguage code corresponding to the declaration of the structures used.
    If you want to manage the errors, select "Add the WLanguage code to display a message if an error occurs".
  3. Click the "Copy" button associated with the WLanguage syntax.
  4. In your WINDEV project, select the process that must call the Windows API function.
  5. In the code editor, select "Paste" in the context menu (or press Ctrl + V).
  6. Adapt the copied code to your application: initialize the variables according to your program.
  7. If structures are required, the declaration code of these structures must be copied to your WLanguage code. To do so:
    • Click the "Copy" button associated with the declaration code of WLanguage structures.
    • In your WINDEV project, select the requested process:
      • initialization process of project (recommended).
      • declaration process of global variables of window.
      • declaration process of global variables of set of procedures in which the call to the API function is performed.
    • In the code editor, select "Paste" in the context menu (or press Ctrl + V).
Rare case: It may happen that some characteristics linked to a Windows API function are not interpreted properly by WDAPI. In this case, the conversion must be performed by yourself.
Example:
See also
Minimum version required
  • Version 9
Comments
Click [Add] to post a comment

Last update: 06/01/2023

Send a report | Local help