XML 操作に XslCompiledTransform クラスを使用する C# DLL があります。C# DLL の C++/CLI ラッパーを盗みました。
Delphi 5 を使用して C++/CLI ラッパーを実装すると、システム演算エラーが発生します。Delphi 5 の宣言は次のとおりです。
procedure XsltMethod(XmlPath, XsltPath: PWideChar); cdecl; external 'ahma.dll';
C# public メソッドの本体は新しい XslCompiledTransform オブジェクトを作成し、新しく作成されたオブジェクトがそのloadメソッドを実行するとすぐに例外がポップアップします。例えば:
XslCompiledTransform xslt = new XslCompiledTransform();
xslt.Load(XsltFile);
前述のように、.NET DLL からスローされる例外はシステム算術例外です。これは、Delphi 実行可能ファイルから呼び出された場合にのみ発生します。
I guess I should mention calling the object's load method again works fine. So catching the exception and running the method for a second "pass" acts like a popup blocker. But for exceptions, of course.