Category : C Source Code
Archive   : IMDSRC78.ZIP
Filename : SWAP.H

 
Output of file : SWAP.H contained in archive : IMDSRC78.ZIP
/* This conditional extern statement is required when compiling with
Turbo C++
*/
#ifdef __cplusplus
extern "C" {
#endif

int swap (unsigned char *program_name,
unsigned char *command_line,
unsigned char *exec_return,
unsigned char *swap_fname);

#ifdef __cplusplus
}
#endif

int ems4_installed (void);
int xms_installed (void);

/* The return code from swap() will be one of the following. Codes other */
/* than SWAP_OK (0) indicate that an error occurred, and thus the program */
/* has NOT been swapped, and the new program has NOT been executed. */

#define SWAP_OK (0) /* Swapped OK and returned */
#define SWAP_NO_SHRINK (1) /* Could not shrink DOS memory size */
#define SWAP_NO_SAVE (2) /* Could not save program to XMS/EMS/disk*/
#define SWAP_NO_EXEC (3) /* Could not execute new program */


/* If swap() returns 3, SWAP_NO_EXEC, the byte/char pointed to by the */
/* parameter exec_return will be one of the following standard DOS error */
/* codes, as specified in the DOS technical reference manuals. */

#define BAD_FUNC (0x01) /* Bad DOS function number--unlikely */
#define FILE_NOT_FOUND (0x02) /* File not found--couldn't find program_name */
#define ACCESS_DENIED (0x05) /* Access denied--couldn't open program_name */
#define NO_MEMORY (0x08) /* Insufficient memory to run program_name */
#define BAD_ENVIRON (0x0A) /* Invalid environment segment--unlikely */
#define BAD_FORMAT (0x0B) /* Format invalid--unlikely */



  3 Responses to “Category : C Source Code
Archive   : IMDSRC78.ZIP
Filename : SWAP.H

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/