home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / MAXMAILP.ZIP / SWAP.H < prev    next >
C/C++ Source or Header  |  1990-10-04  |  2KB  |  41 lines

  1. /* This conditional extern statement is required when compiling with
  2.    Turbo C++
  3.  */
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7.  
  8. int swap (unsigned char *program_name,
  9.           unsigned char *command_line,
  10.           unsigned char *exec_return,
  11.           unsigned char *swap_fname);
  12.  
  13. #ifdef __cplusplus
  14. }
  15. #endif
  16.  
  17. int ems4_installed (void);
  18. int xms_installed (void);
  19.  
  20. /* The return code from swap() will be one of the following.  Codes other    */
  21. /* than SWAP_OK (0) indicate that an error occurred, and thus the program    */
  22. /* has NOT been swapped, and the new program has NOT been executed.          */
  23.  
  24. #define SWAP_OK         (0)         /* Swapped OK and returned               */
  25. #define SWAP_NO_SHRINK  (1)         /* Could not shrink DOS memory size      */
  26. #define SWAP_NO_SAVE    (2)         /* Could not save program to XMS/EMS/disk*/
  27. #define SWAP_NO_EXEC    (3)         /* Could not execute new program         */
  28.  
  29.  
  30. /* If swap() returns 3, SWAP_NO_EXEC, the byte/char pointed to by the        */
  31. /* parameter exec_return will be one of the following standard DOS error     */
  32. /* codes, as specified in the DOS technical reference manuals.               */
  33.  
  34. #define BAD_FUNC        (0x01)   /* Bad DOS function number--unlikely          */
  35. #define FILE_NOT_FOUND  (0x02)   /* File not found--couldn't find program_name */
  36. #define ACCESS_DENIED   (0x05)   /* Access denied--couldn't open program_name  */
  37. #define NO_MEMORY       (0x08)   /* Insufficient memory to run program_name    */
  38. #define BAD_ENVIRON     (0x0A)   /* Invalid environment segment--unlikely      */
  39. #define BAD_FORMAT      (0x0B)   /* Format invalid--unlikely                   */
  40.  
  41.