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.

74 lines
1.9 KiB

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