Function API

Top 

 

Declaration:

unsigned long API(char func_name[], ... );

Description

Calls a 16-bit Windows API function with the name specified in func_name and transfers the parameters specified in API to this function.

Make sure you use the correct parameter number and size, because <%CM%> knows nothing about them. When necessary, use the explicit type conversions and put character 'L' in the end of long-type constants.

To reduce problems, when an array is transferred as the parameter, a long (32-byte) pointer is transferred.

Returned value

What was returned by the called API function is in registers DX:AX. If it is a pointer, then data can be accessed using the peek, poke, peekb, or pokeb functions.

Example

int ScreenHeight = API("GetSystemMetrics", SM_CYFULLSCREEN);