typedef struct NAMEBUFFER
{
CP_CHAR cpcName[8];
// Folder and Variable Name Buffer
}NAMEBUFFER;
The variables are stored in structures that are defined as:
typedef struct _VARIABLEMANAGEMENTSTRUCT{
NAMEBUFFER naName;
// Variable Name
DWORD dwOffsetAdr; // Variable offest
DWORD dwDataSize; // Variable data size
UCHAR ucType; // Data Type
UCHAR ucFlag;
UCHAR ucReserve;
// Reserved
UCHAR ucFolderNo; // Folder Management Area
}VALMANSTRUCT;
For the most part, you do not need to concern yourself with the internals of MCS or the
specifics of these structures. Most of the time you will interact with MCS via the
functions that are contained in MCSBiosO.h or the CPFile classes, and never modify a
variable or a folder struct directly.
Interacting with MCS via BIOS Functions
The file MCSBiosO.h contains several functions that allow you to interact with MCS in
your add-in. In this section we will go through most of the functions in MCSBiosO.h and
provide examples on how to use them.
Creating/Deleting Variables and Folders
Before we begin using the BIOS functions to create a variable, let’s see how it is done in
Main on the ClassPad. On the ClassPad, start up main and type in
. Then click on the
ClassPad Menu->Settings->Variable Manager. The variable manager will open and you
will see that the main folder has one variable in it. Double click on that folder and you
will find your variable x with a value of 5.
111