using System; using System.Runtime.InteropServices; namespace Lskj.AttachStart.Service { [StructLayout(LayoutKind.Sequential, Pack = 1)] public struct C2S_EditFileDirectory { public const uint ID = 3; public MsgHeader header; public uint dwFileId; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 512)] public byte[] szDirName; public C2S_EditFileDirectory(bool autoSet) { this.dwFileId = 0; this.szDirName = new byte[512]; this.header = new MsgHeader(); this.header.dwType = 3; this.header.dwLen = (uint)Marshal.SizeOf(this); } } }