我有一个 .NET 可执行程序集,它通过 P/invoke 引用非托管 C++ dll。在对 .net 程序集进行强名称签名后,我在访问非托管 dll 时在某些随机点遇到访问冲突。然后我在没有签名的情况下重新编译了程序集,仍然得到同样的错误。通过 DebugDiag 运行它我从崩溃报告中得到以下信息
second_Chance_Exception_C0000005.dmp the assembly instruction at 0x00963c37 which does not correspond to any known native module in the process has caused an access violation exception (0xC0000005) when trying to read from memory location 0x0000000c on thread 10
Thread 10 - Entry point clr!StrongNameSignatureVerification+16491
Create time 4/1/2013 12:10:32 ìì
Time spent in user mode 0 Days 0:0:2.515
Time spent in kernel mode 0 Days 0:0:0.125
73 0x79206dc9 0x00000000 clr!StrongNameErrorInfo+966b 0x00000000
74 0x792084c5 0x0477ffb4 clr!StrongNameErrorInfo+ad67 clr!StrongNameErrorInfo+941c
75 0x792f76e0 0x0477ffec clr!StrongNameSignatureVerification+164d9 0x00000000
这让我认为它仍在查找验证。我不明白这是怎么发生的
另一方面,强命名程序集可以引用未管理的 dll 吗?