Article ID: 327106 - View products that this article applies to.
This article was previously published under Q327106
If you call some methods in the Marshal class, the application throws an exception that is similar to the following.
where ConsoleApplication1.exe is the application that calls the Marshal class application programming interface (API) with a pointer, with the ByRef keyword, or with an array-type parameter.
An unhandled exception of type 'System.ExecutionEngineException' occured in ConsoleApplication1.exe
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
The following code can cause the problem.