PC Review


Reply
Thread Tools Rating: Thread Rating: 1 votes, 1.00 average.

How to debug an unmanaged dll?

 
 
Ole
Guest
Posts: n/a
 
      12th Nov 2007
In my Pocket PC solution I have C# project and an unmanaged C++ dll project
that is called by the C# project. The C++ project deploys the dll file to
the device when it has changed. What should I do to debug my dll - I have
set /ASSEMBLYDEBUG correctly but I still got the message "The breakpoint
will not currently be hit" at the breakpoints in the dll source??

Thanks
Ole


 
Reply With Quote
 
 
 
 
Christopher Fairbairn
Guest
Posts: n/a
 
      13th Nov 2007
"Ole" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> In my Pocket PC solution I have C# project and an unmanaged C++ dll
> project that is called by the C# project. The C++ project deploys the dll
> file to the device when it has changed. What should I do to debug my dll -
> I have set /ASSEMBLYDEBUG correctly but I still got the message "The
> breakpoint will not currently be hit" at the breakpoints in the dll
> source??


Hi,

Unlike on the desktop you can not debug both managed (C#) and unmanaged
(C++) source code at the same time within the smart device environment.

You have to switch between debugging the native and managed parts of your
code manually. You can do this via Visual Studio's "attach to process"
functionality.

This functionality needs to be enabled on your PDA before you can utilise
it. David Kline outlines the process in his blog posting available at
https://blogs.msdn.com/davidklinems/...24/421566.aspx

MSDN also have some suitable articles surrounding this process:

Walkthrough: Debugging a Solution That Includes Both Managed and Native
Code - http://msdn2.microsoft.com/en-us/library/ms228818(VS.80).aspx

How To: Attach to Managed Debug Processes -
http://msdn2.microsoft.com/en-us/library/b1ksfbk7(VS.80).aspx

The walkthrough in particular will perhaps be helpful to you.

Hope this helps,
Christopher Fairbairn

 
Reply With Quote
 
Fabien
Guest
Posts: n/a
 
      13th Nov 2007
Hi,

You can try to add your native project to a solution with your C#
project. Then in the C++ project, click on properties, then debugging
tab, then in Remote Executable put the path of your managed
executable. Then click on Debug, Start new instance on the native
project.

BR

Fabien Decret (Device Application Development MVP)
Windows Embedded Consultant

ADENEO (ADESET)
http://www.adeneo.adetelgroup.com/ | http://fabdecret.blogspot.com/


On 28 oct, 01:30, Thomas W <tho...@w.w> wrote:


On 13 nov, 00:17, "Christopher Fairbairn" <christop...@christec.co.nz>
wrote:
> "Ole" <o...@blabla.com> wrote in message
>
> news:(E-Mail Removed)...
>
> > In my Pocket PC solution I have C# project and an unmanaged C++ dll
> > project that is called by the C# project. The C++ project deploys the dll
> > file to the device when it has changed. What should I do to debug my dll -
> > I have set /ASSEMBLYDEBUG correctly but I still got the message "The
> > breakpoint will not currently be hit" at the breakpoints in the dll
> > source??

>
> Hi,
>
> Unlike on the desktop you can not debug both managed (C#) and unmanaged
> (C++) source code at the same time within the smart device environment.
>
> You have to switch between debugging the native and managed parts of your
> code manually. You can do this via Visual Studio's "attach to process"
> functionality.
>
> This functionality needs to be enabled on your PDA before you can utilise
> it. David Kline outlines the process in his blog posting available athttps://blogs.msdn.com/davidklinems/archive/2005/05/24/421566.aspx
>
> MSDN also have some suitable articles surrounding this process:
>
> Walkthrough: Debugging a Solution That Includes Both Managed and Native
> Code -http://msdn2.microsoft.com/en-us/library/ms228818(VS.80).aspx
>
> How To: Attach to Managed Debug Processes -http://msdn2.microsoft.com/en-us/library/b1ksfbk7(VS.80).aspx
>
> The walkthrough in particular will perhaps be helpful to you.
>
> Hope this helps,
> Christopher Fairbairn



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to debug unmanaged DLL with web application? Vlad Microsoft ASP .NET 1 30th Oct 2008 07:31 PM
Debug - Unmanaged and managed code =?Utf-8?B?VGlt?= Microsoft C# .NET 0 29th Dec 2005 06:30 AM
Debug into unmanaged C++ code from managed dll =?Utf-8?B?TWljaGFlbA==?= Microsoft VC .NET 4 13th Jul 2005 11:49 PM
Debug Error on virtual unmanaged functions. Jacobo Rodriguez Villar Microsoft VC .NET 1 12th May 2004 09:06 AM
Is it possible to debug unmanaged dll with CE.NET apps? Minghai Chang Microsoft Dot NET Compact Framework 1 22nd Jul 2003 07:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:11 PM.