Category : Alternate Operating Systems - Quarterdeck DesqView, CP/M, etc
Archive   : APICSAMP.ZIP
Filename : HELLO.C

 
Output of file : HELLO.C contained in archive : APICSAMP.ZIP
/****************************************************************
*
* Name: HELLO
*
* Function: display "hello world" in the task window
*
* Shows how to: 1. write a "minimal" DESQview-specific program.
* 2. initialize and disable the C interfaces.
* 3. detect DESQview's presence.
* 4. enable DESQview extensions.
* 5. write to the default task window.
*
****************************************************************/

#include
#include "dvapi.h"

/* minimum API version required */
#define required 0x201

/* actual API version */
int version;


/**********************************************************************
* main - check for DESQview present and enable required extensions.
***********************************************************************/

main () {
/* initialize C interfaces and get API version number */
version = api_init();

/* if DESQview is not running or version is too low, display a message */
if (version < required) {
printf ("This program requires DESQview version %d.02%d or later.\n",
required/256,required%256);
}

/* tell DESQview what extensions to enable */
else {
api_level (required);

/* extend greetings */
win_printf (win_me(),"hello world\n");
}

/* disable C interfaces and return from program */
api_exit();
}



















  3 Responses to “Category : Alternate Operating Systems - Quarterdeck DesqView, CP/M, etc
Archive   : APICSAMP.ZIP
Filename : HELLO.C

  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/