"C" DLL template

#define  STRICT

#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

#define _EXP __far __pascal _export

int _EXP GetRandom(int i)
{
  return ((rand() % i) + 1);
}

void _EXP SetRand(void)
{
  randomize();
}
 

/********************************************************************/
#pragma argsused
int FAR PASCAL LibMain( HINSTANCE hInstance,
                        WORD wDataSegment,
                        WORD wHeapSize,
                        LPSTR lpszCmdLine )
{
    if ( wHeapSize != 0 )
        UnlockData( 0 );
    return 1;   // Indicate that the DLL was initialized successfully.
}

#pragma argsused
int FAR PASCAL WEP ( int bSystemExit )
{
    return 1;
}