--- os2sdk/demos/examples/dynlink/dynlib.c 2018/08/09 12:25:13 1.1.1.1 +++ os2sdk/demos/examples/dynlink/dynlib.c 2018/08/09 12:26:22 1.1.1.2 @@ -1,7 +1,7 @@ /* * dynlib.c * - * Created 17 August 1987 by Kevin Ruddell for Microsoft Corp + * Created by Microsoft Corp. 1987 * * Dynamic link library demo module with non-shared data. * @@ -27,13 +27,16 @@ * */ -#include +#define INCL_DOSFILEMGR + +#include +#include int _acrtused=0; unsigned id=0; /* process-unique identifier */ unsigned far * pcount=0; /* pointer to the shared process count */ -void far pascal /* This routine is called during per-process */ +void APIENTRY /* This routine is called during per-process */ init_id(pc) /* initialization to pass the pointer to the */ unsigned far * pc; /* shared count and to set the non-shared id. */ { @@ -41,7 +44,7 @@ unsigned far * pc; /* shared count a id = *pc; } -void far pascal /* This routine is called by the process to show */ +void APIENTRY /* This routine is called by the process to show */ printdata() /* on the screen the current values of the */ /* non-shared id and the shared count. */ { @@ -49,13 +52,13 @@ printdata() /* on the screen the cu static char mid[]=". There are "; static char end[]=" processes attached.\r"; char c; - int Written; + USHORT Written; - DOSWRITE(1, beg, sizeof(beg)-1, &Written); + DosWrite(1, beg, sizeof(beg)-1, &Written); c = id + '0'; - DOSWRITE(1, &c, sizeof(char), &Written); - DOSWRITE(1, mid, sizeof(mid)-1, &Written); + DosWrite(1, &c, sizeof(char), &Written); + DosWrite(1, mid, sizeof(mid)-1, &Written); c = *pcount + '0'; - DOSWRITE(1, &c, sizeof(char), &Written); - DOSWRITE(1, end, sizeof(end)-1, &Written); + DosWrite(1, &c, sizeof(char), &Written); + DosWrite(1, end, sizeof(end)-1, &Written); }