WindowProtect.cs 898 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.Runtime.InteropServices;
  5. using Biff8Excel.Interfaces;
  6. namespace Biff8Excel.Records
  7. {
  8. [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Auto, Pack = 1)]
  9. struct RecordWindowsProtect
  10. {
  11. public ushort opcode;
  12. public ushort length;
  13. public ushort protect;
  14. }
  15. internal class WindowsProtect : IRecords
  16. {
  17. RecordWindowsProtect windowsprotect;
  18. public WindowsProtect()
  19. {
  20. windowsprotect.opcode = 0x19;
  21. windowsprotect.length = 0x2;
  22. }
  23. public ushort Protect
  24. {
  25. set { windowsprotect.protect = value; }
  26. }
  27. #region IRecords ³ÉÔ±
  28. public byte[] GetByte()
  29. {
  30. return Globals.GetStructToBytes(windowsprotect);
  31. }
  32. #endregion
  33. }
  34. }