在我的計劃在這條線:FatalExecutionEngineError同時調用DLL方法
int value = MTEConnect(auth_string, err);
我收到這樣exeption:
FatalExecutionEngineError
The runtime has encountered a fatal error. The address of the
error was at 0x68c8a681, on thread 0x2334. The error code is
0xc0000005. This error may be a bug in the CLR or in the unsafe
or non-verifiable portions of user code. Common sources of this
bug include user marshaling errors for COM-interop or PInvoke,
which may corrupt the stack.
MTEConnect導入這樣的方式:
[DllImport("mtesrl.dll", CharSet = CharSet.Ansi)]
private static extern int MTEConnect(String pars, StringBuilder err);
有什麼問題和如何解決它?
UPD:我可以重現另一臺機器上同樣的問題,但我得到多一點desriptive消息:
Managed Debugging Assistant 'FatalExecutionEngineError' has detected a problem in 'C:\blahblah\MBClient\bin\Debug\MBClient.vshost.exe
庫本身是功能性的,因爲它可以從其他應用程序中使用,我只是不能使用它從c#
很高興你知道了! – JaredPar 2011-05-20 15:16:37
我也是:)花了一個星期解決thiz謎題:) – javapowered 2011-05-20 18:53:16