Example

The following is a sample external function routine:
Sample external function routine

ULONG SysMkDir(
     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     */
{
  ULONG  rc;                           /* Return code of function    */
  if (Argc != 1)                       /* must be 1 argument         */
    return 40;                         /* incorrect call if not      */
                                       /* make the directory using   */
                                       /* the null-terminated        */
  rc = DosMkDir(Argv[0].strptr, 0L);   /* directly                   */
  sprintf(Retstr->strptr, "%d", rc);   /* result is return code      */
                                       /* set proper string length   */
  Retstr->strlength = strlen(Retstr->strptr);
  return 0;                            /* successful completion      */
}


[Back: Calling External Functions]
[Next: External Functions Interface Functions]