CD Burning using IMAPI
-
Hello... There is a requirement of burning data into a CD from my application which i developed in VC++.net I tried to use Imapi.h related functionalities. but its not in my XP SDK.So i used another dll file(acclImapiWrapper.Dll) which i downloaded from the website... http://www.vbaccelerator.com/home/NET/Code/Libraries/Writing\_CDs/IMAPI/article.asp Using this dll file i tried the following code... try{ DiscMaster* DM ; SimpleDiscRecorder* sRecorder ; DiscRecorders* DRs; ` DiscRecorder * DR; DM = new DiscMaster(); sRecorder = DM->SimpleDiscRecorder; DRs = DM->DiscRecorders; int i,cnt; cnt = DRs->get_Count() ; for (i=0;iDiscRecorders->get_Item(i); } DR->OpenExclusive(); DR = DM->DiscRecorders->get_Item(0); Cursor::Current = System::Windows::Forms::Cursors::WaitCursor ; if (sRecorder->HasRecordableDrive()) { //sRecorder->Burn(this->Handle); DM->RecordDisc(true,true); } MessageBox(0,"CD Burning completed successfully","CD Burning",0); Cursor::Current = System::Windows::Forms::Cursors::Default ; DR->CloseExclusive(); sRecorder->Dispose(); DR->Dispose(); DM->Dispose(); }catch(COMException* e) { e->Message; } The data is staging on CD but burning Cd is not successful.. Could any one help me out?? Regards Salai
Salai
-
Hello... There is a requirement of burning data into a CD from my application which i developed in VC++.net I tried to use Imapi.h related functionalities. but its not in my XP SDK.So i used another dll file(acclImapiWrapper.Dll) which i downloaded from the website... http://www.vbaccelerator.com/home/NET/Code/Libraries/Writing\_CDs/IMAPI/article.asp Using this dll file i tried the following code... try{ DiscMaster* DM ; SimpleDiscRecorder* sRecorder ; DiscRecorders* DRs; ` DiscRecorder * DR; DM = new DiscMaster(); sRecorder = DM->SimpleDiscRecorder; DRs = DM->DiscRecorders; int i,cnt; cnt = DRs->get_Count() ; for (i=0;iDiscRecorders->get_Item(i); } DR->OpenExclusive(); DR = DM->DiscRecorders->get_Item(0); Cursor::Current = System::Windows::Forms::Cursors::WaitCursor ; if (sRecorder->HasRecordableDrive()) { //sRecorder->Burn(this->Handle); DM->RecordDisc(true,true); } MessageBox(0,"CD Burning completed successfully","CD Burning",0); Cursor::Current = System::Windows::Forms::Cursors::Default ; DR->CloseExclusive(); sRecorder->Dispose(); DR->Dispose(); DM->Dispose(); }catch(COMException* e) { e->Message; } The data is staging on CD but burning Cd is not successful.. Could any one help me out?? Regards Salai
Salai
There's a component called XPBurn, if your app is XP only, that does the trick nicely.
Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert