Skip to main content
1-Visitor
January 30, 2013
Solved

user defined DLL problem

  • January 30, 2013
  • 1 reply
  • 1417 views

Hi MathCad Community,

I've been trying to write a few user defined MathCad functions. I've been successfully developed and tested a few functions purely written in C++. However I also have a few functions already implemented in C# and I have converted them into managed dll, and registered them through regasm.exe and imported them into C++ dll. Works fine on development machine, but on a test machine, MathCad says "External component has thrown an exception". I have no idea where this problem is rising, and I would greately appreciate any help.

I have attached a few files, they are a copy of my C# project files and C++ dll files.

Thanks,

Maryam

Best answer by ptc-4941142

I have solved the problem, it was a huge discovery for me. It might be a joke for most of people out there, but for a beginner like me took long time to realize that I had to register the C# dll on the test machine, since the VC++ deployed dll does not carry it forward to the test machine. SO yes, it is possible to write VC++ dlls that call C# dll inside from MATHCAD and enjoy the added user defined functions.

1 reply

ptc-49411421-VisitorAuthorAnswer
1-Visitor
February 4, 2013

I have solved the problem, it was a huge discovery for me. It might be a joke for most of people out there, but for a beginner like me took long time to realize that I had to register the C# dll on the test machine, since the VC++ deployed dll does not carry it forward to the test machine. SO yes, it is possible to write VC++ dlls that call C# dll inside from MATHCAD and enjoy the added user defined functions.