home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: OtherApp / OtherApp.zip / FSHL125.LZH / TESTDLL.LZH / TESTDLL.C < prev    next >
C/C++ Source or Header  |  1992-02-21  |  939b  |  60 lines

  1. #include <string.h>
  2.  
  3. #define INCL_DOS
  4. #define INCL_VIO
  5. #define INCL_NOPM
  6. #include <os2.h>
  7.  
  8.  
  9. USHORT APIENTRY INIT(VOID);
  10. USHORT APIENTRY CLEANUP(VOID);
  11. USHORT APIENTRY PROCESS(PCHAR pchToken, PCHAR pchCmdLine);
  12.  
  13. static VOID prt1(PCHAR pch);
  14. static VOID prt2(PCHAR pch1, PCHAR pch2);
  15.  
  16.  
  17. USHORT APIENTRY INIT()
  18. {
  19.  
  20.   prt1("In TestDLL.INIT. Mem allocation, whatever goes here.\r\n");
  21.   return 0;
  22. }
  23.  
  24.  
  25. USHORT APIENTRY CLEANUP()
  26. {
  27.  
  28.   prt1("In TestDLL.CLEANUP.  Mem deallocation, etc. goes here.\r\n");
  29.   return 0;
  30. }
  31.  
  32.  
  33. USHORT APIENTRY PROCESS(PCHAR pchToken, PCHAR pchCmdLine)
  34. {
  35.  
  36.   prt1("In TestDLL.PROCESS.\r\n");
  37.   prt2("  token   = [", pchToken);
  38.   prt2("  cmdline = [", pchCmdLine ? pchCmdLine : "<null>");
  39.   return 0;
  40. }
  41.  
  42.  
  43. static VOID prt1(PCHAR pch)
  44. {
  45.  
  46.   VioWrtTTY(pch, strlen(pch), 0);
  47. }
  48.  
  49.  
  50.  
  51. static VOID prt2(PCHAR pch1, PCHAR pch2)
  52. {
  53.  
  54.   prt1(pch1);
  55.   prt1(pch2);
  56.   prt1("]\r\n");
  57. }
  58.  
  59.  
  60.