How to Notify my application?




how can i notify my application from the static NeroSDK callbacks:


BOOL NERO_CALLBACK_ATTR ServiceNeroBurning::ProgressCallback(void *pUserData, DWORD dwProgressInPercent)
// here i get the error= “illegal call of non-static member function”
return true;

thanks zik


You cannot call a non-static member function from within a static function, as the ProgressCallback function is.

I send a message to the window that updates the progress bar with the dwProgressInPercent passed to it.

I store a pointer to this window in a static variable m_pWndOwner in the class constructor.

In my class header file I have:

static CWnd* m_pWndOwner;

And in the .cpp file:

CWnd* CNeroInterface::m_pWndOwner = NULL; // initialise variable

//Class constructor

CNeroInterface::CNeroInterface(CWnd* pOwner)
m_pWndOwner = pOwner; // m_pWndOwner now points to the window
// that handles the progress messages

// Progress Callback function

BOOL NERO_CALLBACK_ATTR CNeroInterface::ProgressCallback(void* pUserData,
DWORD dwProgressInPercent)
if(NULL != m_pWndOwner)
(WPARAM)dwProgressInPercent, (LPARAM)0);



The class that handles the WM_PROGRESS message will recieve the progress bar value as its first parameter.

Hope this helps.


Thanks that were helpful.

I have another q do you have some code example of a function that’s get a directory path string something like:

MapFiles(CString sDirPath)

And recursively maps all the files to the NeroSDK.

Like the Nero express do with add file/dir for burning…

Thanks zik


Hi. I have answered your question in the correct thread.