--- os2sdk/demos/examples/dynlink/dynlib2.c 2018/08/09 12:25:13 1.1.1.1 +++ os2sdk/demos/examples/dynlink/dynlib2.c 2018/08/09 12:26:22 1.1.1.2 @@ -1,18 +1,21 @@ /* * dynlib2.c * - * Created 17 August 1987 by Kevin Ruddell, Microsoft Corp + * Created by Microsoft Corp. 1987 * * Dynamic link library demo module with shared data. * */ -#include +#define INCL_DOSFILEMGR + +#include +#include #include "dynlib.h" /* calling conventions */ unsigned count=0; /* shared process count */ -int far pascal /* This routine is called by the initialization */ +int APIENTRY /* This routine is called by the initialization */ initroutine() /* asm module to actually do the per-process */ /* initialization. */ { @@ -20,20 +23,20 @@ initroutine() /* asm module to actu static char First[]="First time initialization.\n\r"; static char NotFirst[]="Not first time initialization.\n\r"; char c; - int Written=0; + USHORT Written=0; if (count++ == 0) { - DOSWRITE(1, First, sizeof(First)-1, &Written); /* first time */ + DosWrite(1, First, sizeof(First)-1, &Written); /* first time */ } else { - DOSWRITE(1, NotFirst, sizeof(NotFirst)-1, &Written); /* not first */ + DosWrite(1, NotFirst, sizeof(NotFirst)-1, &Written); /* not first */ } - DOSWRITE(1, beg, sizeof(beg)-1, &Written); /* show new count */ + DosWrite(1, beg, sizeof(beg)-1, &Written); /* show new count */ c = count + '0'; - DOSWRITE(1, &c, sizeof(char), &Written); - DOSWRITE(1, ".\n\r", 3, &Written); + DosWrite(1, &c, sizeof(char), &Written); + DosWrite(1, ".\n\r", 3, &Written); INIT_ID( (unsigned far *) &count); /* store count as id */ /* and pointer to count */ return(1); /* indicate success */