Leaked source code of windows server 2003
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.

35 lines
639 B

  1. /*
  2. * C R C . H
  3. *
  4. * CRC Implementation
  5. *
  6. * Copyright 1986-1997 Microsoft Corporation, All Rights Reserved
  7. */
  8. #ifndef _CRC_H_
  9. #define _CRC_H_
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. // Table used for CRC calculation
  14. //
  15. extern const DWORD g_rgdwCRC[256];
  16. // Basic CRC function
  17. //
  18. DWORD DwComputeCRC (DWORD dwCRC, PVOID pv, UINT cb);
  19. // Basic CRC iteration -- for use where DwComputeCRC is insufficient
  20. //
  21. #define CRC_COMPUTE(_crc,_ch) (g_rgdwCRC[((_crc) ^ (_ch)) & 0xff] ^ ((_crc) >> 8))
  22. #ifdef __cplusplus
  23. }
  24. // CRC'd string classes
  25. //
  26. #include <crcsz.h>
  27. #endif // __cplusplus
  28. #endif // _CRC_H_