tx 19 内存已损坏 The specified format is invalid.
对文档进行合并处理后,帮看下The specified format is invalid.(01-2408) 是什么意思 ?用服务端组件导出报: System.AccessViolationException: 尝试读取或写入受保护的内存。这通常指示其他内存已损坏。
客户端组件保存文档时报错:
System.Exception: Format error: The specified format is invalid.(01-2408)
在 TXTextControl.SaveSettings.?(String , StreamType , TextControlCore , ? )
在 TXTextControl.TextControl.Save(String path, StreamType streamType, SaveSettings saveSettings)
---------------------------------------------------------------------------
客户端组件保存代码:
this.wordControl.Save(exportfileName, StreamType.RichTextFormat, SaveSettings);
服务端组件保存代码:
private static ServerTextControl serverControl = new ServerTextControl();
/// <summary>
/// 用服务端组件导出生成好的带附加项目明细的文档
/// </summary>
/// <param name="fileFullName"></param>
/// <param name="fileContent"></param>
/// <returns></returns>
private static bool ExportReportDataFileWithServerControl_export(string fileFullName, byte[] fileContent)
{
try
{
//服务端组件导常
serverControl.Create();
serverControl.Load(fileContent, BinaryStreamType.InternalUnicodeFormat);
serverControl.Save(fileFullName, StreamType.RichTextFormat);
return true;
}
catch (Exception ex)
{
MsgBox.WriteMsgFile(TConfigInfo.ApplicationPath + @"\log\报告数据批量导出日志.Txt", "报告导出服务端保存报告异常。" + ex);
return false; 回复 1楼远光软件的帖子
从代码看,保存的是 StreamType.RichTextFormat 格式,加载时 BinaryStreamType.InternalUnicodeFormat是这个格式,请您核查一下格式是否一致。 回复 1楼远光软件的帖子
请问问题是否解决?为了给你提供更优质的服务,请对本次服务进行评分。我们会认真对待你提出的宝贵意见,谢谢
http://gcdn.gcpowertools.com.cn/attachment.aspx?attachmentid=10062
页:
[1]