NeroBurn crash - the solution

vbimport

#1

Hi everyone,
i want to share my experiences about NeroBurn with you, it may probably help you solving your problem.

I use the “Microsoft Development Environment 2003” (V7.1) with Visual C++. I had a big problem burning CDs with the “NeroBurn” function - after correctly burning the CD Nero always crashed with a runtime error (access violation). I searched the Internet a lot for this problem but found nothing which solved it. I also tried many different project settings and parameters for the Nero functions. At last i found the following solution:

  • You have to use a struct member alignment of 8 bytes (that’s written in “NeroApi.h”), you can use “#pragma pack(8)” in the source code or set it in the project settings “C/C++”->“Code Generation” (as far as i know, the default setting is 8 bytes). One hint that you have the wrong alignment is, when you insert an empty CD and compare the values ‘ncdiFreeCapacityInBlocks’ and ‘ncdiTotalCapacity’ of the “NERO_CD_INFO” struct (you can get this by calling the “NeroGetCDInfo” function). The values should be identical. If not, you probably have a wrong alignment.

  • You should not include the “libcmt.lib” (or “libcmtd.lib” for debug), i.e. you have to exclude it explicitely in the “linker”->“input” settings. It seems to be ok to use the “MSVCRT.LIB” (or “MSVCRTD.LIB” for debug) instead.

  • And the main thing is, you should not use the “Edit & Continue” feature of the MS Developer Studio (case sensitive compiler option “/ZI”). With this feature you can change the code while debugging and continue testing. The problem seems to be that the “function level linking” (/Gy) is also activated and that the linker then links wrong functions.

bye,
Odin_70