.NET 6 and C++/CLI Dllexport p/invoke in problem

JieGG 1 Reputation point
2022-01-15T15:51:15.66+00:00

I discovered a serious problem.
I in c++ used cli and dllexport, try in use C# 'P/Invoke' call c++ dll export function. but in DoNet6 throw 'SEHExcption'; but DoNet5 can normal working.

issues demo:
C++ code:
165337-c.png

C# code:
165338-c.png

.NET CLI
.NET CLI
A cross-platform toolchain for developing, building, running, and publishing .NET applications.
322 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,218 questions
{count} votes