namespace LSServerService { using System; using System.Runtime.InteropServices; [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); } } }