473,395 Members | 1,999 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Stack Overflow using wrapped C++ DLL from C#

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?

Nov 17 '05 #1
1 3706
Found out that I needed to use EDITBIN /STACK: on the C# EXE and then it
worked fine.

"Lee Greco" wrote:
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?

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Aguilar, James | last post by:
Hello all, To begin, yes, this -is- a homework assignment. However, it is for my Algorithms class, and my instructor has given us explicit permission to use "expert" groups like newsgroups, so...
19
by: Jim | last post by:
I have spent the past few weeks designing a database for my company. The problem is I have started running into what I believe are stack overflow problems. There are two tab controls on the form...
4
by: Victor | last post by:
Hello, I've got a situation in which the number of (valid) recursive calls I make will cause stack overflow. I can use getrlimit (and setrlimit) to test (and set) my current stack size. ...
2
by: David W. Walker | last post by:
I am attempting to port a C code that runs OK on a number of Linux and Unix machines to Windows XP using Visual Studio C++. I have set the program up as a console application, but when I try to run...
2
by: Ali | last post by:
Hi, I got stack overflow errors while using an unmanaged dll from managed c# application. When i use editbin.exe to increase stack size of app , it works. Is there a way to increase stack size of...
2
by: robert | last post by:
When employing complex UI libs (wx, win32ui, ..) and other extension libs, nice "only Python stack traces" remain a myth. Currently I'm hunting again a rare C-level crash bug of a Python based...
7
by: amit.atray | last post by:
Environement : Sun OS + gnu tools + sun studio (dbx etc) having some Old C-Code (ansi + KR Style) and code inspection shows some big size variable (auto) allocated (on stack) say for ex. char...
12
by: Geoff Cox | last post by:
Hello, Some one is getting the "stack overflow" error message when using a Javascript program which I wrote when using Internet Explorer but not when using Mozilla. Any ideas as to how I...
5
by: moondaddy | last post by:
I'm trying to serialize some xaml elements using the XamlWriter and I'm getting a stack overflow error because the elements have some public properties which get called about a million ( a lot)...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.