Stack Overflow using wrapped C++ DLL from C#

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?
 
G

Guest

Found out that I needed to use EDITBIN /STACK: on the C# EXE and then it
worked fine.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top