Static Link Method

Using the static link method the application can simply call the hllapi entry point when needed such as:
  #include "hapi_c.h"
  int HFunc, HLen, HRc;                                 // Function parameters
  char HBuff[1];                                        // Function parameters
  ...
  HFunc = HA_RESET_SYSTEM;                              // Run EHLLAPI function
  HLen  = 0;
  HRc   = 0;
  hllapi(&Func, HBuff, &HLen, &HRc);
  if (HRc != 0) {
    // ... EHLLAPI access error
  }
When the application is linked, the appropriate Personal Communications library files must be linked with the application executable code. For example, the following link command might be used (IBM® VisualAge® C/C++):
    ilink /de /noe pcscal32.lib sample.obj

When the operating system loads an application constructed in this way, the Personal Communications EHLLAPI module is loaded automatically.