home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
comos2.zip
/
COMM.HPP
< prev
next >
Wrap
Text File
|
1993-02-16
|
2KB
|
61 lines
/**************************************************************************
*
* COMM.HPP
*
* This file contains the header file needed to compile COMMOS2.CPP.
* This file should not be included in source code which wishes to use
* the CommOS2 class library.
*_________________________________________________________________________
*
* Copyright (c) 1992 by ASH Software, Inc.
*
* Update History
*
* 12/ 6/1992 - Module created
*
**************************************************************************/
#if !defined(COMM__HPP)
#define COMM__HPP
#define INCL_DOS
#define INCL_ERRORS
#define INCL_DOSDEVIOCTL
#define INCL_DOSDEVICES
#include <os2.h>
#include <stdio.h>
#include <stdlib.h>
#include "COMMOS2.HPP"
//
// This library uses a number of semaphores to serialize access to
// resources. The following variable determines how long to wait
// before returning to the calling program with an error. The
// definition contains the length of time (in msec) to wait for
// the semaphore. In addition, the definition SEM_INDEFINITE_WAIT
// may be used to wait forever and SEM_IMMEDIATE_RETURN to return
// without waiting.
//
#define COMMOS2_RESOURCE_SEM_WAIT 5000L // Wait 5 seconds
#define COMM_QUERY_RXCOUNT 1
#define COMM_QUERY_RXBUFFER 2
#define COMM_QUERY_TXCOUNT 3
#define COMM_QUERY_TXBUFFER 4
#define TimerValue TIMERVALUE32
#define TimerDifference TIMERDIFFERENCE32
#define CommQueryQueue COMMQUERYQUEUE32
//
// Declare static functions
//
static ULONG TimerValue(VOID);
static ULONG TimerDifference(ULONG ulBaseTimerValue);
#endif