mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
911 B
27 lines
911 B
/*
|
|
* circbuf.h
|
|
*/
|
|
|
|
|
|
/* Structure to manage the circular input buffer.
|
|
*/
|
|
typedef struct circularBuffer_tag
|
|
{
|
|
HANDLE hSelf; /* handle to this structure */
|
|
HANDLE hBuffer; /* buffer handle */
|
|
WORD wError; /* error flags */
|
|
DWORD dwSize; /* buffer size (in EVENTS) */
|
|
DWORD dwCount; /* byte count (in EVENTS) */
|
|
LPEVENT lpStart; /* ptr to start of buffer */
|
|
LPEVENT lpEnd; /* ptr to end of buffer (last byte + 1) */
|
|
LPEVENT lpHead; /* ptr to head (next location to fill) */
|
|
LPEVENT lpTail; /* ptr to tail (next location to empty) */
|
|
} CIRCULARBUFFER;
|
|
typedef CIRCULARBUFFER FAR *LPCIRCULARBUFFER;
|
|
|
|
|
|
/* Function prototypes
|
|
*/
|
|
LPCIRCULARBUFFER AllocCircularBuffer(DWORD dwSize);
|
|
void FreeCircularBuffer(LPCIRCULARBUFFER lpBuf);
|
|
WORD FAR PASCAL GetEvent(LPCIRCULARBUFFER lpBuf, LPEVENT lpEvent);
|