opencv运行时,出错误,反汇编10035FDC mov eax,dword ptr [edi+10h] 是啥意思?

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了opencv运行时,出错误,反汇编10035FDC mov eax,dword ptr [edi+10h] 是啥意思?相关的知识,希望对你有一定的参考价值。

参考技术A 貌似很难,顶一个吧!

在c#中反序列化时,BinaryFormatter找不到'汇编'

我有一个序列化和反序列化调用的程序,当我尝试将我的DLL附加到另一个程序时,它说:Unable to find assembly 'ASCOM.BHOProxy.Connector, Version=1.0.0.0, Culture=neutral, PublicKeyToken=74643865492aa2e6'.

我可以理解这是一个参考问题还是什么,但问题是抛出异常的代码是在ASCOM.BHOProxy.Connector中。我曾想过要使用某种第三方Serializer,但我不太清楚要使用什么。程序集由另一个由应用程序加载的DLL加载。

序列化数据通过TCP连接传输到相同的连接器(通常是由另一个程序加载的相同文件),在那里进行反序列化。尝试反序列化时抛出异常,但只有在从外部程序调用它时才会抛出异常。在visual studio中调试时工作正常。

Their Program --(late binding)--> My Main DLL --(.NET Project Reference)--> My Connector DLL

堆栈跟踪:

   at System.Runtime.Serialization.Formatters.Binary.BinaryAssemblyInfo.GetAssembly()
   at System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType(BinaryAssemblyInfo assemblyInfo, String name)
   at System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor(String objectName, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[] typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 objectId, BinaryAssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable)
   at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped record)
   at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryHeaderEnum binaryHeaderEnum)
   at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
   at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream)
   at Connector.PortComProxy.DecodeMessage(List`1 buff) in c:UsersArlenDocumentsVisual Studio 2012ProjectsDriverProxyPortComClientPortComProxy.cs:line 259
答案

我不知道为什么有时候找不到集会。但是,我使用AppDomain.AssemblyResolve事件来加载通过.NET提供的正常程序集负载分辨率无法找到的程序集。在我的情况下,这是因为我必须从注册表项中找到程序集,使用我能够找到的事件并加载程序集,防止程序集未找到异常。

至少利用此事件可能允许您验证BinaryFormatter尝试解析的类型。

另一答案

非常感谢Ken,做到了。这是我为其他可能需要它的人所做的。我不知道旋转变压器是否静止是否有任何区别。

using System.Reflection;
...
public class MyClass{
    public MyClass()
    { 
        AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(MyResolveEventHandler);
    }
    private static Assembly MyResolveEventHandler(object sender, ResolveEventArgs args)
    {
        return typeof(MyClass).Assembly;
    }
}

以上是关于opencv运行时,出错误,反汇编10035FDC mov eax,dword ptr [edi+10h] 是啥意思?的主要内容,如果未能解决你的问题,请参考以下文章

汇编数据段地址问题 看我的源代码,从反汇编的代码中可以看到段地址DS应该为075A 但是D命令查看的结果不是

InternetReadFileEx 给出 10035 和 1008 错误

arm函数内部进行模式切换的技巧

在c#中反序列化时,BinaryFormatter找不到'汇编'

dll文件如何反汇编成源码,C++语言编写

VS15打不开反汇编窗口