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.

76 lines
1.7 KiB

  1. /*++
  2. Copyright (C) 1996-1999 Microsoft Corporation
  3. Module Name:
  4. _WTRMARK.H
  5. History:
  6. --*/
  7. #pragma once
  8. const int EWM_MAX_LENGTH = 512; // Watermarks should never be longer
  9. // than this
  10. static TCHAR g_cWMSep = _T('\t');
  11. // All watermarks begin with this string
  12. static TCHAR g_szWMLocString[] = _T("Localized");
  13. //
  14. // This class does not need to be exported as all implementations
  15. // are inline
  16. //
  17. class CLocWMCommon
  18. {
  19. public:
  20. CLocWMCommon(const CLString& strSource, const ParserId& pid,
  21. const CLString& strParserVer);
  22. CLString m_strSource; // Name of the source file
  23. ParserId m_pid; // Parser using the watermark
  24. CLString m_strParserVer; // Version of the parser
  25. };
  26. //
  27. // struct defining the header of watermarks when encoded in binary file types
  28. //
  29. #include <pshpack1.h>
  30. struct EWM_HEADER
  31. {
  32. BYTE bVersion; // Version of the binary data
  33. WORD wLength; // Length of the string
  34. };
  35. #include <poppack.h>
  36. const BYTE EWM_ESP21_VERSION = 0;
  37. const BYTE EWM_ESP30_VERSION = 1;
  38. const BYTE EWM_DEFAULT_VERSION = 1;
  39. //
  40. // This function will retrieve the current date from the system and build the
  41. // common Espresso WaterMark. A Tab character separates elements of the
  42. // watermark.
  43. //
  44. void LTAPIENTRY ComposeWaterMark(const CLocWMCommon& wm,
  45. CLString& strWaterMark);
  46. //
  47. // This function will encode the watermark into non-readable characters and
  48. // place the encoded string with the WM_HEADER in baOut.
  49. //
  50. void LTAPIENTRY EncodeWaterMark(const CLString& strNormal, CByteArray& baOut);
  51. void LTAPIENTRY EnCryptWaterMark(DWORD* pData, int nLength);
  52. #include "_wtrmark.inl"