home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / comos2.zip / COMM.HPP < prev    next >
Text File  |  1993-02-16  |  2KB  |  61 lines

  1. /**************************************************************************
  2.  *
  3.  *  COMM.HPP
  4.  *
  5.  *  This file contains the header file needed to compile COMMOS2.CPP.
  6.  *  This file should not be included in source code which wishes to use 
  7.  *  the CommOS2 class library.
  8.  *_________________________________________________________________________
  9.  *
  10.  *  Copyright (c) 1992 by ASH Software, Inc.
  11.  *
  12.  *  Update History
  13.  *
  14.  *    12/ 6/1992 - Module created
  15.  *
  16.  **************************************************************************/
  17.  
  18. #if !defined(COMM__HPP)
  19.   #define COMM__HPP
  20.  
  21.   #define INCL_DOS
  22.   #define INCL_ERRORS
  23.   #define INCL_DOSDEVIOCTL
  24.   #define INCL_DOSDEVICES
  25.   
  26.   #include <os2.h>
  27.   #include <stdio.h>
  28.   #include <stdlib.h>
  29.   
  30.   #include "COMMOS2.HPP"
  31.  
  32.   //
  33.   // This library uses a number of semaphores to serialize access to
  34.   // resources.  The following variable determines how long to wait 
  35.   // before returning to the calling program with an error.  The
  36.   // definition contains the length of time (in msec) to wait for
  37.   // the semaphore.  In addition, the definition SEM_INDEFINITE_WAIT
  38.   // may be used to wait forever and SEM_IMMEDIATE_RETURN to return
  39.   // without waiting.
  40.   //
  41.  
  42.   #define COMMOS2_RESOURCE_SEM_WAIT     5000L  // Wait 5 seconds
  43.  
  44.   #define COMM_QUERY_RXCOUNT             1
  45.   #define COMM_QUERY_RXBUFFER            2
  46.   #define COMM_QUERY_TXCOUNT             3
  47.   #define COMM_QUERY_TXBUFFER            4
  48.  
  49.   #define TimerValue            TIMERVALUE32
  50.   #define TimerDifference       TIMERDIFFERENCE32
  51.   #define CommQueryQueue        COMMQUERYQUEUE32
  52.  
  53.   //
  54.   // Declare static functions
  55.   //
  56.  
  57.   static ULONG TimerValue(VOID);
  58.   static ULONG TimerDifference(ULONG ulBaseTimerValue);
  59.  
  60. #endif
  61.