Writing a HLLAPI Program

This introduction assumes you are familiar with the various HLLAPI function calls.

To use the functions in the CEN HLLAPI library, your program must first dynamically load the CEN HLLAPI library and then get a pointer to the HLLAPI() function. The following C code sample demonstrates this process.

PHLLAPI pfnHllapi;

HINSTANCE hLib;

char *pszDLLName= "EHLLAP32.DLL";

hLib = LoadLibrary(pszDLLName);

if (hLib == NULL)

{

/* Display and return error */

return;

}

pfnHllapi= (PHLLAPI) GetProcAddress(hLib, "hllapi");

if (pfnHllapi == NULL)

{

/* Display and return error */

return;

}

Use the function pointer to the hllapi() function to call into the EHLLAP32.DLL. The following C code demonstrates this process.

void ExecuteHLLAPIFunc(int *FuncNo, char *Data, int *Len, int *RC)

{

(*pfnHllapi)(FuncNo, Data, Len, RC );

}