NeroVision API



When using the NeroVision API, does the IProgressCallback object need to be passed to CreateNeroBurnContext()?

Im currently passing NULL and getting a Access Violation exception. The API documentation below hints it doesn’t need to be?

VARIANT_BOOL bSuccess = m_pProject->CreateNeroBurnContext (NeroAPIGlueGetModuleHandle (),NULL,&pBurnContext);

This method creates a NeroBurnContext object which can be burned with Nero. If a ProgressCallback is passed, it will receive progress information.

HRESULT CreateNeroBurnContext([in] HMODULE hNeroAPIDLL, [in]
IProgressCallback* pCallback, [out] INeroBurnContext** ppburnContext,
[out, retval] boolean* pbSuccess);


The IProgressCallback can be NULL. I have just tried it by modifying the NVAPIExample project from NeroSDK. Everything was fine. There must be something else you are doing wrong.


Thanks Alex, found the problem.

If theres anyone else getting the same error, it turns out that if you don’t call EstimateCreateNeroBurnContextTime BEFORE calling CreateNeroBurnContext, this error occurs.

This method can also accept NULL intead of a IProgressCallback if you don’t need/want any callbacks.

bSuccess = m_pProject->EstimateCreateNeroBurnContextTime (NULL, &dSeconds);