User Tools

Site Tools


prototypes_and_declarations.htm
Navigation:  Advanced Topics > API Calls and Advanced Resources >====== Prototypes and Declarations ====== Previous pageReturn to chapter overviewNext page

Clarion includes files with prototypes, declarations, and headers that you can use to let Clarion “talk” to Windows, C/C++, Modula-2, and vice versa.

Clarion to C/C++ Standard Library

To call the standard C library functions from Clarion applications, include \CLIB.CLW in the “Inside the Global Map” embed point.

INCLUDE('CLIB.CLW')

This file contains Clarion prototypes for various string handling functions, integer math, character type functions, and low level file manipulation functions. Refer to your C/C++ Library Reference for more information on individual functions.

Clarion to Windows API

To call Windows API functions from Clarion applications, you must include the functions' prototypes in your application's MAP structure, and any standard EQUATEs or data structures that the functions need in your Global data declarations.

Clarion contains the WINAPI.EXE utility program that creates the file you need to include in your application. This program, by default, creates the WINAPI.CLW file which has two sections: the “Equates” section containing all EQUATE statements and any data structures needed by the functions you choose, and the “Prototypes” section containing the Clarion language prototypes of Windows API functions you choose to use.

Include the Equates section of WINAPI.CLW in the “After Global INCLUDEs” embed point:

INCLUDE('WINAPI.CLW','Equates')

Include the Prototypes section of WINAPI.CLW in the “Inside the Global Map” embed point:

INCLUDE('WINAPI.CLW','Prototypes')

Refer to your Windows API reference for more information on the individual API functions available to you in categories such as:

Creating Windows

Window Support

Message Processing

Memory Management

Bitmaps and Icons

Color Palette Control

Sound

Character Sets and Strings

Communications

Metafiles

Tool Help Library

File Compression

Installation and Version Information

TrueType Fonts

Multimedia

Modula-2 to Clarion

Clarion's Runtime Library

To call the Clarion runtime library procedures create a definition file (.DEF) that contains Modula-2 declarations for various Clarion Language procedures, as well as the many standard C library functions that are found in the Clarion Runtime Library. The available functions are documented in the Clarion's Runtime Library Functions section of this section.

Clarion's File Driver Procedures

To call the Clarion database file driver procedures create a definition file (.DEF) that contains Modula-2 declarations for Clarion's FILE, RECORD, KEY, INDEX, MEMO, and BLOB handling procedures, including a complete description of Clarion's file control block.

C/C++ to Clarion

Clarion's Runtime Library

To call the Clarion runtime library procedures create a header file (.H) that contains C/C++ prototypes for various Clarion Language procedures, as well as many standard C library functions that are found in the Clarion Runtime Library. The available functions are documented below in the Clarion's Runtime Library Functions section.

Clarion's File Driver Procedures

To call the Clarion database file driver procedures create a header file (.H) that contains contains C/C++ prototypes for Clarion's FILE, RECORD, KEY, INDEX, MEMO, and BLOB handling procedures, including a complete description of Clarion's file control block.

prototypes_and_declarations.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1