RexxRegisterFunctionDll - Example

The following is a sample function package load routine:
Function package load routine

static PSZ  RxFncTable[] =             /* function package list      */
{
      "SysCls",
      "SysCurpos",
      "SysCurState",
      "SysDriveInfo",
}
ULONG SysLoadFuncs(
     PSZ       Name,                   /* name of the function       */
     LONG      Argc,                   /* number of arguments        */
     RXSTRING  Argv[],                 /* list of argument strings   */
     PSZ       Queuename,              /* current queue name         */
     PRXSTRING Retstr)                 /* returned result string     */
{
  INT    entries;                      /* Num of entries             */
  INT    j;                            /* Counter                    */
  Retstr->strlength = 0;               /* set null string return     */
  if (Argc > 0)                        /* check arguments            */
    return 40;                         /* too many, raise an error   */
                                       /* get count of arguments     */
  entries = sizeof(RxFncTable)/sizeof(PSZ);
                                       /* register each function in  */
  for (j = 0; j < entries; j++) {      /* the table                  */
    RexxRegisterFunctionDll(RxFncTable[j],
          "REXXUTIL", RxFncTable[j]);
  }
  return 0;                            /* successful completion      */
}


[Back: RexxRegisterFunctionDll - Remarks]
[Next: RexxRegisterFunctionExe]