Editing the API and Message Files

RadASM has included a lot of the common API calls but there may be instances where you wish to add one or two. In the assembler folders there are files that contain the information for the RadASM code completion feature. This will discuss modifying these files for MASM, the procedure is identical for other assemblers.

Code Completion files

masmApiCall.api -contains a list of API calls and their parameters
masmApiConst.api - contains a list of constants for xxxxApiCall.api
masmApiWord.api -contains a simple list of common statements and constants
masmMessage.api -contains a simple list of windows messages

MASM, TASM, GoAsm and NASM also have files that contain their structures
nasmApiStruct.api
tasmApiStruct.api
masmApiStruct.api
GoAsmApiStruct.api

The masmApiCall.api and masmApiConst.api files are linked to one another and must be edited in concert as follows:

Example:
From masmApiCall.api
AppendMenu,hMenu,wFlags,wIDNewItem,lpNewItem

From masmApiConst.api
2AppendMenu,MF_BITMAP,MF_OWNERDRAW,MF_SEPARATOR,MF_STRING

The api calls parameters are defined in masmApiCall.api and these parameters will appear when the API function is typed after an invoke statement. In masmApiConst.api you can set the drop-down list values for each of these parameters. In the example above  the second parameter (2) of the AppendMenu function from the masmApiCall.api file will display a drop-down list containing MF_BITMAP, MF_OWNERDRAW, MF_SEPARATOR, MF_STRING. Do not use spaces in this file as those spaces will be copied to your code. Only API functions that have been previously defined in masmApiCall.api will be loaded otherwise they are ignored.

The xxxxApiStruct.api files have the following structure:

NameOfStruct,Field1,Field2,etc..

.Example:
MMTIME,mmt_wType,mmt_TimeUnion