Stack Overflow using wrapped C++ DLL from C#

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

A third party vendor has provided me a C++ .Net DLL, a .lib and all necessary
..h files, as well as a sample C++ .NET app that uses the DLL. The sample app
needs the Stack Reserve Size set to 2meg, as well as a few other Compiler and
Linker options set. I want to access the DLL's functionality in a C# app, so
I've wrapped the vendor's DLL in a new C++ DLL that publicly exposes managed
classes usable by C#. I've set the Stack Reserve Size for the new DLL to
2meg. Problem is, when I add a reference to the new DLL in a C# app and
attempt to access a method that calls a function in the 3rd party DLL, I get
a Stack Overflow exception. I do not get the exception if I use a C++ exe
that references the new DLL and has the Stack Reserve Size set to 2meg. Is
there any way to use this DLL in a C# app?
 
Back
Top