Source code of Windows XP (NT5)
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

  1. /*
  2. * circbuf.h
  3. */
  4. /* Structure to manage the circular input buffer.
  5. */
  6. typedef struct circularBuffer_tag
  7. {
  8. HANDLE hSelf; /* handle to this structure */
  9. HANDLE hBuffer; /* buffer handle */
  10. WORD wError; /* error flags */
  11. DWORD dwSize; /* buffer size (in EVENTS) */
  12. DWORD dwCount; /* byte count (in EVENTS) */
  13. LPEVENT lpStart; /* ptr to start of buffer */
  14. LPEVENT lpEnd; /* ptr to end of buffer (last byte + 1) */
  15. LPEVENT lpHead; /* ptr to head (next location to fill) */
  16. LPEVENT lpTail; /* ptr to tail (next location to empty) */
  17. } CIRCULARBUFFER;
  18. typedef CIRCULARBUFFER FAR *LPCIRCULARBUFFER;
  19. /* Function prototypes
  20. */
  21. LPCIRCULARBUFFER AllocCircularBuffer(DWORD dwSize);
  22. void FreeCircularBuffer(LPCIRCULARBUFFER lpBuf);
  23. WORD FAR PASCAL GetEvent(LPCIRCULARBUFFER lpBuf, LPEVENT lpEvent);