473,473 Members | 1,843 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Debugging an unmanaged DLL

I have a managed .Net assembly (C#) that invokes code in an unmanaged DLL
written in C++ 6 via an unsafe assembly that invokes the C++ routines and
marshals the data. The interface is not working properly.

Is there a way to have the C++ 6 debugger running on the unmanaged DLL when
it is invoked from the .Net debugger? I cannot step into the DLL, but can I
access it via a separate debugger?

Or am I left with instrumentation as the only debugging tool?

-Ken
Nov 16 '05 #1
2 1786
If I remember correctly, with VS.NET you should be able to step into the
unmanaged code from the .NET code if you set "Native" as well as the managed
setting.

--
----------------------------------
Sam Gentile
MVP - C#/.NET
INETA Speaker http://www.ineta.org/DesktopDefault.aspx
Read my blog at http://samgentile.com/blog/
------------------------------------------------------
"Ken Allen" <ke******@sympatico.ca> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
I have a managed .Net assembly (C#) that invokes code in an unmanaged DLL
written in C++ 6 via an unsafe assembly that invokes the C++ routines and
marshals the data. The interface is not working properly.

Is there a way to have the C++ 6 debugger running on the unmanaged DLL when it is invoked from the .Net debugger? I cannot step into the DLL, but can I access it via a separate debugger?

Or am I left with instrumentation as the only debugging tool?

-Ken

Nov 16 '05 #2
If this works at all, I am certain that it only works with unmanaged DLLs
developed with .Net studio!

In my case the DLL is still being compiled with Developer Studio 6 while I
am doing new development in .Net, and it does not seem to permit me to cross
the DLL boundary in the debugger.

-Ken

"Sam Gentile [MVP - C#/.NET]" <no****@nomail.com> wrote in message
news:u7**************@TK2MSFTNGP12.phx.gbl...
If I remember correctly, with VS.NET you should be able to step into the
unmanaged code from the .NET code if you set "Native" as well as the managed setting.

--
----------------------------------
Sam Gentile
MVP - C#/.NET
INETA Speaker http://www.ineta.org/DesktopDefault.aspx
Read my blog at http://samgentile.com/blog/
------------------------------------------------------
"Ken Allen" <ke******@sympatico.ca> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
I have a managed .Net assembly (C#) that invokes code in an unmanaged DLL written in C++ 6 via an unsafe assembly that invokes the C++ routines and marshals the data. The interface is not working properly.

Is there a way to have the C++ 6 debugger running on the unmanaged DLL when
it is invoked from the .Net debugger? I cannot step into the DLL, but

can I
access it via a separate debugger?

Or am I left with instrumentation as the only debugging tool?

-Ken


Nov 16 '05 #3

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

Similar topics

2
by: Lee Crabtree | last post by:
I have a managed C++ DLL wrapping some unmanaged C++ code. I'm using this DLL in a C# program, and I need to watch some of the buffers being used. When I try to use the memory debugger window in...
3
by: Mark Jerde | last post by:
I googled and found a half-dozen good threads on debugging C# / VCPP on a machine with both tools installed. But my co-worker and I haven't figured out how she can debug her C++ code on her...
2
by: jpuopolo | last post by:
All: I have developed an ActiveX control using unmanaged C++ (MFC). I have also developed a C# application to server as a test harness. Both ActiveX and test harness application are built in...
0
by: Sericinus hunter | last post by:
This post is mostly for picking up by Google and information purposes. The problem itself is solved for me. Generally, debugging .Net COM dll should not pose any problems, but you will be...
3
by: dvestal | last post by:
Sorry if this double-posts, google just crashed on me. I'm trying to debug an unmanaged C++ DLL from a C# application. The C# app references the DLL using DLLImport attributes. They are in the...
5
by: Howard Swope | last post by:
I have a series of third party libraries for which we have licensed the source code. These are unmanaged libraries written in C++ which I am able to build without any trouble. I am trying to setup...
2
by: Ed | last post by:
Hello, dear all, I have a solution that contain the managed project and unmanaged project source code, and managed project will use the unmanaged project as a library. The debugging in the...
3
by: Pixel.to.life | last post by:
All, A question on JIT debugging with VS2005. I have a managed app that builds great on one machine (Vista Home basic, VS2005, JIT enabled for managed/unmanaged code). I can also debug it...
1
by: Ole | last post by:
I have added a C++ dll to my solution where my main program (C#) is calling the dll using DllImports but I got the message ""The breakpoint will not currently be hit" when trying to debug my dll...
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...
1
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.