Category : OS/2 Files
Archive   : VIOREG.ZIP
Filename : TEST.C
VIOPRTSC () .*/
#define ADDRESSING far
#define CALLING pascal
#define CONVENTION ADDRESSING CALLING
#include "doscalls.h"
/* user defined VIOPRTSC () */
unsigned CONVENTION VIOPRTSC (j)
unsigned j ;
{
int i ;
/* test message to verify the working of this function */
DOSWRITE (1, "This is from DLL", sizeof ("This is from DLL"), &i) ;
return 0 ;
}
/* compiler emits _acrtused as an external to pull in crt0.obj that
defines _astart and calls _main. Add a dummy so crt0 is not pulled
in. */
struct route_information {
unsigned last_parameter ;
unsigned long return_address ;
unsigned function_number ;
unsigned callers_ds ;
unsigned long vio_router ;
} ;
#if defined( Use_viotty )
unsigned CONVENTION VIOWRTTTY (
char far * CharStr ,
unsigned Length ,
unsigned VioHandle
)
{
int i ;
struct route_information far * route_information = & VioHandle ;
/* test message to verify the working of this function */
DOSWRITE (1, "This is from DLL", sizeof ("This is from DLL"), &i) ;
return -1 ;
}
#endif
int far VIDEOROUTER (unsigned temp2,
unsigned temp1,
unsigned index,
unsigned long stuff,
unsigned VioHandle ,
unsigned Length ,
char far * CharStr
) ;
int far VIDEOROUTER (unsigned temp2,
unsigned temp1,
unsigned index,
unsigned long stuff,
unsigned VioHandle ,
unsigned Length ,
char far * CharStr
)
{
int i ;
/* test message to verify the working of this function */
//DOSWRITE (1, "This is from DLL", sizeof ("This is from DLL"), &i) ;
DOSWRITE (1, &index , sizeof ( index ), &i) ;
DOSWRITE (1, & VioHandle , sizeof ( VioHandle ), &i) ;
DOSWRITE (1, & Length , sizeof ( Length ), &i) ;
DOSBEEP ( 20000 , 1 ) ;
return -1 ;
return 0 ;
}
#undef CALLING
#define CALLING cdecl
int CONVENTION _acrtused(){} ;
/* the start up routine must be called _astart and it must return
success or failure. Return success. */
int CONVENTION _astart() {
return 1 ;
}
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
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/