I have a C# DLL that uses the XslCompiledTransform class for xml manipulations. I stole a C++/CLI wrapper for the C# DLL.
When using Delphi 5 to implement the C++/CLI wrapper, I receive a System Arithmetic error. Here is the Delphi 5 declaration:
procedure XsltMethod(XmlPath, XsltPath: PWideChar); cdecl; external 'ahma.dll';
The body of the C# public method creates a new XslCompiledTransform object and the exception pops up right when the newly created object runs its load method. For example:
XslCompiledTransform xslt = new XslCompiledTransform();
xslt.Load(XsltFile);
As mentioned earlier, the exception thrown from the .NET DLL is a System Arithmetic Exception. This only happens when called from a Delphi executable.
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.