Lock up in VERY simple application

vbimport

#1

I’ve been plagued with problems ever since attempting to use the Nero SDK.
My Nero version is 7.2.0.3 and I’m using the 1.06 SDK.

So, before I throw in the towel and look at other ways of achieving my objectives I thought I’d open this one up to the forum for comments.

I’ve reduced everything down to the bare minimum to illustrate my problem. All I have is a bog standard MFC dialog application. I’ve added the Nero header files and NeroAPIGlue.lib to the project directory and updated the project settings accordingly.

I then added the following code to OnInitDialog() so that it now looks like this:


BOOL CNerotempDlg::OnInitDialog()
{
    CDialog::OnInitDialog();

    BOOL connect = NeroAPIGlueConnect(NULL);
    ASSERT( connect );

    NERO_SETTINGS nsSettings;
    memset( &nsSettings, 0, sizeof(NERO_SETTINGS) );
    NEROAPI_INIT_ERROR initErr = NeroInit (&nsSettings, NULL);
    ASSERT( initErr == NEROAPI_INIT_OK );

    NERO_SCSI_DEVICE_INFOS* pndiDeviceInfos = NULL;
    pndiDeviceInfos = NeroGetAvailableDrivesEx (MEDIA_CD, NULL);
    NeroFreeMem(pndiDeviceInfos);

    NeroClearErrors();
    NeroAPIGlueDone();

    EndDialog( IDOK );
	
    return TRUE;
}

It compiles fine and when I run it I get no errors (I have one Plextor CD writer in my system). However, the application never terminates correctly and is left in limbo somewhere in exit() in the C runtime library.

HOWEVER, if I just comment out the NeroGetAvailableDrivesEx() line everything works perfectly and the application exits cleanly.

I just can’t see what I’m doing wrong. Fiddling around in nsSettings doesn’t seem to make any difference.

Does anyone out there have any ideas? My application is so small I’m at a loss to know where to look next.


#2

It actually ends up hanging in the call to ExitProcess() in crt0dat.c.

Just about the very last thing that happens in the application windup sequence. I can only assume that Nero has not given up some resource or handle.

Very frustrating!!!


#3

I’ve had trouble with calling NeroGetAvailableDrivesEx() from a COM component I’m writting for creating DVD/VCD slideshows. I get an access violation as the COM component’s smart pointer goes out of scope.

Frustrating thing is I have another COM component that is for backing up my app’s data and that works fine when calling NeroGetAvailableDrivesEx().

I’ll post more information when I’ve had time to look into it further.


#4

I’m currently working around the problem by making a direct call to TerminateProcess( GetCurrentProcess(), 0 ) in the clean up code of my application.

It’s not pretty and I’m not proud of it, but it seems to work.

Without being disrespectful to Nero, I do think that they should either invest some effort in tidying up the rather rough (and sometimes fatal) edges of their SDK, or withdraw it altogether.