問題タブ [interopservices]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
0 に答える
34 参照

c# - c++ dll を参照すると、.netcore アプリが SEHException 例外をスローする

C++ dll を作成しました。System.Runtime.InteropServices を使用しています。まず、.netcore コンソール アプリケーションで dll をテストしたところ、正常に動作しました。.netcore アプリケーションで参照しようとすると、SEHException が発生します: 外部コンポーネントが例外をスローしました: dll を参照する方法は次のとおりです。

0 投票する
0 に答える
52 参照

c# - C++ で記述された Dll を C# .NetCore にインポートできない

C++ を使用して単純な dll を作成しました。ac# .NetStandard プロジェクトにインポートすると、正しく動作します。しかし、それを c# .NetCore プロジェクトにインポートすると、例外がスローされます System.BadImageFormatException: An attempt was made to load a program with an incorrect format.

.NetCore と .NetStandard の両方の DLL インポート コードは同じです

どうすれば解決できますか?