Files
lserp_cs_6.0/插件库/Lskj.AttachStart/Service/C2S_ReqBackgroundDownload.cs
T
cyf ab56a9bcf7 基线 SVN r240
SVN-Revision: r240
2025-02-06 06:46:06 +00:00

55 lines
1.4 KiB
C#

using System;
using System.Runtime.InteropServices;
namespace Lskj.AttachStart.Service
{
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct C2S_ReqBackgroundDownload
{
public const int DownLoadModel = 1;
public const int GetFileListModel = 2;
public const uint ID = 65543;
public MsgHeader header;
public int reqType;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1024)]
public byte[] szPath;
public C2S_ReqBackgroundDownload(bool autoSet)
{
this.header = new MsgHeader();
this.reqType = 1;
this.szPath = new byte[1024];
this.header.dwType = 65543;
this.header.dwLen = (uint)Marshal.SizeOf(this);
}
public bool isDownloadModel
{
get
{
return (this.reqType == 1);
}
}
public bool isGetFileListModel
{
get
{
return (this.reqType == 2);
}
}
public string strPath
{
get
{
return PubUtils.BytesToStr(this.szPath);
}
set
{
byte[] src = PubUtils.StrToBytes(value);
Buffer.BlockCopy(src, 0, this.szPath, 0, src.Length);
src = null;
}
}
}
}