LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Debugging a c++ dll from visual studio 2010

Solved!
Go to solution

Yep,it's one of those little annoying thing that if one is glad to can get rid off 🙂 once again thank

0 Kudos
Message 11 of 14
(1,310 Views)

@Bublina wrote:

It is good to know, that if you specify "Attach to process" in debugging project properities, you can attach LabView, so you do not need to turn it off and on.


Depending what you do in your DLL this can catastrophally fail and lock up Visual Studio and LabVIEW completely. But a nice thing if it works.

 

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 12 of 14
(1,301 Views)

How can that happen, I only do this when the Code is not running and the DLL usually unloaded.

0 Kudos
Message 13 of 14
(1,290 Views)

Well I'm not enitrely sure how it happens. Supposedly the Debugger has to inject itself into the process somehow and the way this happens is among many other things also by hooking the application message loop. At the same time the DLL needs to get loaded which also messes with various things in the Windows interna including message handling and also involves some BFGL (big f*cking global locks) which prevent race conditions in the kernel when loading modules.

 

There are several variables that may play a role here such as the Visual C and LabVIEW version, as I'm still mainly developing with older Visual C versions but also what the DLL itself interfaces with. When debugging DLLs that interfaced to COM (which in itself also f*cks immensely with the application message queue under the hood) it was almost always certain to lock up somewhere during attaching the debugger and/or loading of the DLL.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 14 of 14
(1,280 Views)