ni.com is currently undergoing scheduled maintenance.
Some services may be unavailable at this time. Please contact us for help or try again later.
12-13-2009 01:06 PM
Hello everybody,
I'm trying to solve a "General Protection Fault" that happens in debug mode only, calling functions of a protected DLL.
The program is using the standard call LoadLibray / GetProcAddress and then the function pointer.
The release and debug ".exe" are running perfectly well.
The debug mode is running too, when the DLL is not protected !
The protection is made by Execryptor in such way that the DLL couldn't be reversed, functions are decrypted on the fly.
This problem doesn't allow debug step by step for all other lines of code.
The Labwindow/CVI version used is the 6.0. The DLL is not written with Labwindows
Are there any options to avoid to check the lines using those functions.
I already try the functions SetBreakOnLibraryErrors(0); and SetBreakOnFirstChanceException(0); and many other things without success.
Thanks for your ideas.
Pascal
12-14-2009 09:05 AM
Hey Pascal -
There is no way to turn off debugging for a single region of a source file. However, you could put the code you wish to turn off debugging for into it's own source file, then right click that source file, and select "Enable 'O' Option". This option instructs LabWindows/CVI to compile the source file without debugging information.
NickB
National Instruments
12-18-2009 12:22 AM
Hi Nick,
Thanks for your quick answer.
Since this time I'm trying to understand what could happen, because the problem seems to be reported to the calling function in the source module that we would like to debug.
I will prepare a very simple example so that you could better see what is really happening.
Thanks again for your reply
Best regards
Pascal
12-18-2009 04:47 AM
Hi Nick,
You will find hereafter the illustration of the problem, I'm facing...
I had developped the simplest package that I could.
You will find attached a zip package with these source files, a debug "exe" which is running correctly, and the dlls.
The dll is containing only a line to popup a message box that shows "It's OK" when we could see it !
P_MsgBox.dll is the protected version. (release exe, debug exe are running well, interactive debugger gives errors even with "O" option choosen ! )
NP_MsgBox.dll is non protected one. (release exe, debug exe, and interactive debugger are all runnig well )
Thanks again for your help
Pascal