提交当前本机整理版本
This commit is contained in:
@@ -381,4 +381,30 @@ namespace Lskj.MiniBlink
|
||||
{
|
||||
|
||||
var data = (wkeMemBuf)Marshal.PtrToStructure(bf, typeof(wkeMemBuf));
|
||||
if (data.dat
|
||||
if (data.data != IntPtr.Zero && data.length != 0)
|
||||
{
|
||||
byte[] ys = new byte[data.length];
|
||||
Marshal.Copy(data.data, ys, 0, ys.Length);
|
||||
|
||||
string fileName = Guid.NewGuid().ToString("n") + ".bmp";
|
||||
System.IO.File.WriteAllBytes(fileName, ys);
|
||||
MessageBox.Show("截图保存成功,图片地址为:" + Application.StartupPath + "\\" + fileName);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("截图失败,数据解析失败。");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("截图失败,返回空。");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(Message, ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user