TNB Library
TnbPrimoBurnerEngine.h
[詳解]
1#pragma once
21#include "TnbFileFinder.h"
22#include "TnbFileName.h"
23#include "TnbStrVector.h"
24#include "TnbTickCount.h"
25
26
27
28#ifndef _TnbDOXYGEN //Document作成用シンボル
29
30#if defined(___PRIMO_TCHAR_T) | defined(__PRIMO_CHAR_T)
31 #error hpCDE.h will be included previously.
32#endif
33#define ___PRIMO_TCHAR_T
34typedef wchar_t tchar_t;
35#define ___PRIMO_CHAR_T
36typedef wchar_t char_t;
37
38// 以下のPathを通すこと
39#ifdef __MSVCPP6__
40 #define deprecated dllexport
41 #include "hpCDE.h"
42 #undef deprecated
43#else
44 #include "hpCDE.h"
45#endif
46#pragma comment(lib,"hpCDEU.lib")
47#pragma comment(lib,"DataCDU.lib")
48
49#ifdef ___HPSCSI_H___
50 // PrimoBurner 2.10以降を使用
51 #define _TnbPrimoBurner_Used_V2
52#else
53 // PrimoBurner 2.00以降を使用
54 #pragma comment(lib,"HfsU.lib")
55#endif
56
57#endif // _TnbDOXYGEN
58
59
60
61//TNB Library
62namespace TNB
63{
64
65
66
68#define PRIBUR ::primo::burner
70#ifdef _TnbPrimoBurner_Used_V2
71 #define PRISCSI ::primo::scsi
72#else
73 #define PRISCSI ::primo::burner
74#endif
75
76
77
88{
89public:
90
91 #ifndef _TnbDOXYGEN //Document作成用シンボル
92
93 // PointerHandleBase用 汎用 ポインタリリーステンプレートクラス
94 template<typename T> struct TPhReleasePointerT
95 {
96 void operator()(T P) { P->Release(); }
97 };
98
99 #endif // _TnbDOXYGEN
100
101
120 {
121 public:
122
129 {
131 virtual ~IListener(void) {}
132
140 virtual void OnFileStatus(int nFile, LPCWSTR lpszFileName, int nPercent) = 0;
141 };
142
144 CDiscImage(void) : m_hpDataDisc(hpCDE::CreateDataDisc()), m_hpDataFile(hpCDE::CreateDataFile())
145 {
146 m_hpDataFile->SetDirectory(TRUE); // Rootを設定しておく
147 m_hpDataFile->SetFilePath(L"\\");
148 m_hpDataFile->SetLongFilename(L"\\");
149 }
150
153 {
154 }
155
161 {
162 m_callbacker.SetListener(I);
163 }
164
169 PRIBUR::IDataDisc* operator->(void)
170 {
171 return m_hpDataDisc;
172 }
173
179 DWORD GetLastError(void)
180 {
181 return m_hpDataDisc.IsNull() ? 0 : m_hpDataDisc->GetLastError();
182 }
183
191 void SetDefaultParametersForCd(LPCTSTR lpszVolume, EImageType eType = IMG_TYPE_JOLIET, DWORD dwFlags = IC_NONE)
192 {
193 m_hpDataDisc->SetVolumeLabel(CUnicode(lpszVolume));
194 m_hpDataDisc->SetImageType(eType);
195 m_hpDataDisc->SetImageConstraints(dwFlags);
196 m_hpDataDisc->SetTranslateFilenames(false);
198 m_hpDataDisc->SetSessionStartAddress(0);
199 }
200
207 void SetDefaultParametersForDvd(LPCTSTR lpszVolume, EImageType eType = IMG_TYPE_UDF)
208 {
209 SetDefaultParametersForCd(lpszVolume, eType);
210 }
211
219 bool boIsBootableCd, EBootEmulation eEmu = BMT_NO_EMULATION, LPCTSTR lpszbootImageFile = NULL)
220 {
221 m_hpDataDisc->SetBootable(boIsBootableCd);
222 m_hpDataDisc->SetBootEmulation(eEmu);
223 m_hpDataDisc->SetBootImageFile(CUnicode(lpszbootImageFile));
224 }
225
230 void ResetFileImage(void)
231 {
232 m_SetLayout(false);
233 }
234
243 bool AddSource(LPCTSTR lpszName, LPCTSTR lpszImagePath = NULL)
244 {
245 CAppendFile a(lpszName);
246 return m_SetLayout(a.Execute(m_hpDataFile, m_hpDataDisc->GetImageType(), lpszImagePath));
247 }
248
257 bool AddSourceFromPath(LPCTSTR lpszName, LPCTSTR lpszImagePath = NULL)
258 {
259 CAppendPath a(lpszName);
260 return m_SetLayout(a.Execute(m_hpDataFile, m_hpDataDisc->GetImageType(), lpszImagePath));
261 }
262
270 bool CreateImageFile(LPCTSTR lpszFile)
271 {
272 m_hpDataDisc->SetCallback14(&m_callbacker);
273 CUnicode s = CUnicode(lpszFile);
274 s.Replace(L"\\\\", L"\\");
275 bool r = !! m_hpDataDisc->CreateImageFile(s);
276 if ( ! r )
277 {
278 TRACE1("err - %d\n", m_hpDataDisc->GetLastError() - SCSI_SENSE_ERROR_BASE );
279 TRACE1("err - %d\n", GetLastError() );
280 }
281 m_SetLayout(true);
282 return r;
283 }
284
285 private:
286
287 #ifndef _TnbDOXYGEN //Document作成用シンボル
288
292 class CCallBacker : public PRIBUR::IDataDiscCallback14
293 {
294 IListener* m_iListener;
295 public:
297 CCallBacker(void) : m_iListener(NULL) {}
299 virtual ~CCallBacker(void) {}
301 void SetListener(IListener* I)
302 {
303 m_iListener = I;
304 }
306 virtual void OnFileStatus(int nFile, const tchar_t* pFileName, int nPercent)
307 {
308 nPercent = (nPercent > 100) ? 100 : nPercent;
309 TRACE3("No.%d %d%% [%s] \n", nFile, nPercent, CStr(pFileName));
310 if ( m_iListener != NULL )
311 {
312 m_iListener->OnFileStatus(nFile, pFileName, nPercent);
313 }
314 }
316 virtual bool_t OnContinueBurn(void) { return true; }
318 virtual void OnProgress(uint64_t ddwPos, uint64_t ddwAll) {}
320 virtual void OnStatus(EDataDiscStatus eStatus) {}
321 };
322
327 CDataDiscHandle m_hpDataDisc;
328 CDataFileHandle m_hpDataFile;
329 CCallBacker m_callbacker;
330
332 struct TFileInfo
333 {
334 CStr strFileName;
335 CStr strAlternateFileName;
336 bool boHasHidden;
337 CFileTimeEx timeLastWrite;
339 TFileInfo(void) {}
340 TFileInfo(const WIN32_FIND_DATA& fd) {
341 Set(fd);
342 }
344 void Set(const WIN32_FIND_DATA& fd) {
345 strFileName = fd.cFileName;
346 strAlternateFileName = fd.cAlternateFileName;
347 boHasHidden = (fd.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) != 0;
348 timeLastWrite = fd.ftLastWriteTime;
349 }
351 CStr GetFileName(void) const {
352 return strFileName;
353 }
355 CStr GetAlternateFileName(void) const {
356 return strAlternateFileName.Left(12);
357 }
359 FILETIME GetFileTime(void) const {
360 return timeLastWrite;
361 }
362 };
363
365 class CAbstractAppender
366 {
368 bool m_Dig(const CDataFileHandle& hpFile, DWORD dwImageType, const CStr& strImagePath)
369 {
370 if ( strImagePath.IsEmpty() )
371 {
372 return OnFound(hpFile, dwImageType);
373 }
374 CStr s1 = strImagePath;
375 CStr s2;
376 int f = strImagePath.Find(_T('\\'));
377 if ( f < 0 ) { f = strImagePath.Find(_T('/')); }
378 if ( f >= 0 )
379 {
380 s1 = strImagePath.Left(f);
381 s2 = strImagePath.Mid(f + 1);
382 if ( s1.IsEmpty() )
383 {
384 return m_Dig(hpFile, dwImageType, s2);
385 }
386 }
387 CDataFileHandle F = hpFile->Find(CUnicode(_T("/") + s1));
388 if ( F.IsNull() )
389 {
390 F = hpCDE::CreateDataFile();
391 TFileInfo fd;
392 fd.boHasHidden = false;
393 fd.strAlternateFileName = s1;
394 fd.strFileName = s1;
395 fd.timeLastWrite = CFileTimeEx::GetCurrent();
396 SetDataFile(F, true, s1, dwImageType, fd);
397 if ( ! m_Dig(F, dwImageType, s2) )
398 {
399 return false;
400 }
401 hpFile->AddItem(F);
402 }
403 else
404 {
405 if ( ! m_Dig(F, dwImageType, s2) )
406 {
407 return false;
408 }
409 }
410 return true;
411 }
412 public:
414 virtual bool OnSetup(void) = 0;
416 virtual bool OnFound(const CDataFileHandle& hpFile, DWORD dwImageType) = 0;
418 bool Execute(const CDataFileHandle& hpFile, DWORD dwImageType, LPCTSTR lpszImagePath)
419 {
420 if ( ! OnSetup() ) { return false; }
421 CStr str = lpszImagePath;
422 return m_Dig(hpFile, dwImageType, str);
423 }
432 static void SetDataFile(
433 PRIBUR::IDataFile* _pFile, bool boDir, LPCTSTR lpszFilePath, DWORD dwImageType, const TFileInfo& fd)
434 {
435 _pFile->SetDirectory(boDir);
436 _pFile->SetFilePath(CUnicode(lpszFilePath));
437 _pFile->SetLongFilename(CUnicode(fd.GetFileName()));
438 _pFile->SetShortFilename(CUnicode(fd.GetAlternateFileName()));
439 _pFile->SetHiddenAttribute(static_cast<EImageType>(dwImageType), fd.boHasHidden);
440 #ifdef _TnbPrimoBurner_Used_V2
441 FILETIME ft = fd.GetFileTime();
442 _pFile->SetCreationTime(&ft);
443 #else
444 _pFile->SetFileTime(&fd.GetFileTime());
445 #endif
446 }
447 };
448
450 class CAppendFile : public CAbstractAppender
451 {
452 DEFSUPER(CAbstractAppender);
453 CStr m_strFullPath;
454 TFileInfo m_fileInfo;
455 public:
457 CAppendFile(LPCTSTR lpszFullPath) : m_strFullPath(lpszFullPath) {}
459 virtual bool OnSetup(void)
460 {
461 CFileName fn(m_strFullPath);
462 if ( ! fn.IsExist() || fn.IsDirectory() )
463 {
464 return false;
465 }
466 m_fileInfo.boHasHidden = fn.IsHidden();
467 m_fileInfo.timeLastWrite = fn.GetLastWriteTime();
468 m_fileInfo.strAlternateFileName = fn.GetShortName();
469 m_fileInfo.strFileName = fn.GetFileName();
470 m_strFullPath = fn;
471 return true;
472 }
474 virtual bool OnFound(const CDataFileHandle& hpFile, DWORD dwImageType)
475 {
476 CDataFileHandle F = hpCDE::CreateDataFile();
477 SetDataFile(F, false, m_strFullPath, dwImageType, m_fileInfo);
478 hpFile->AddItem(F);
479 return true;
480 }
481 };
482
484 class CAppendPath : public CAbstractAppender
485 {
486 DEFSUPER(CAbstractAppender);
487 CStr m_strPath;
489 bool m_AddTree(PRIBUR::IDataFile* pFile, DWORD dwImageType, LPCTSTR lpszPath)
490 {
491 CFileFinder ff;
492 if ( ff.Start(lpszPath, _T("\\*")) )
493 {
494 do
495 {
496 CStr strFileName = ff->cFileName;
497 CStr strFullPath;
498 strFullPath.Format(_T("%s\\%s"), lpszPath, strFileName);
499 if ( (ff->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0 )
500 {
501 // Dir
502 CDataFileHandle F = pFile->Find(CUnicode(_T("/") + strFileName));
503 if ( F.IsNull() )
504 {
505 F = hpCDE::CreateDataFile();
506 _super::SetDataFile(F, true, strFileName, dwImageType, TFileInfo(ff.Get()));
507 if ( ! m_AddTree(F, dwImageType, strFullPath) )
508 {
509 return false;
510 }
511 pFile->AddItem(F);
512 }
513 else
514 {
515 if ( ! m_AddTree(F, dwImageType, strFullPath) )
516 {
517 return false;
518 }
519 }
520 }
521 else
522 {
523 // File
524 CDataFileHandle F = hpCDE::CreateDataFile();
525 _super::SetDataFile(F, false, strFullPath, dwImageType, TFileInfo(ff.Get()));
526 pFile->AddItem(F);
527 }
528 } while ( ff.Next() );
529 }
530 return true;
531 }
532 public:
534 CAppendPath(LPCTSTR lpszPath) : m_strPath(lpszPath) {}
536 virtual bool OnSetup(void)
537 {
538 CFileFinder ff;
539 return ff.Start(m_strPath, _T("\\*"));
540 }
542 virtual bool OnFound(const CDataFileHandle& hpFile, DWORD dwImageType)
543 {
544 return m_AddTree(hpFile, dwImageType, m_strPath);
545 }
546 };
547
548 #endif //_TnbDOXYGEN
549
554 bool m_SetLayout(bool boIsSet)
555 {
556 try
557 {
558 if ( boIsSet && m_hpDataDisc->SetImageLayout11(m_hpDataFile) )
559 {
560 return true;
561 }
562 m_hpDataFile = hpCDE::CreateDataFile();
563 m_hpDataFile->SetDirectory(TRUE); //ルートを設定しておく
564 m_hpDataFile->SetFilePath(L"\\");
565 m_hpDataFile->SetLongFilename(L"\\");
566 m_hpDataDisc->SetImageLayout11(m_hpDataFile);
567 }
568 catch(PRIBUR::EDataDiscError& error)
569 {
570 IgnoreUnusedValue(error);
571 }
572 return false;
573 }
574 };
575
576
577
590 class CScsi
591 {
592 public:
593
598 CScsi(PRISCSI::IScsiInterface* P = NULL) : m_hpScsi(P)
599 {
600 }
601
603 ~CScsi(void)
604 {
605 }
606
613 bool IsValid(void) const
614 {
615 return ! m_hpScsi.IsNull();
616 }
617
625 bool SendCommand(const ISequenceCollectionT<BYTE>& cdb, DWORD dwTimeout = SCSI_CMD_TIMEOUT_MS_LONG)
626 {
627 if ( m_hpScsi.IsNull() ) { return false; }
628 return !! m_hpScsi->SendCommand(cdb.ReferBuffer(), cdb.GetSize(), SCSI_CMD_DIR_UNSPECIFIED, NULL, 0, dwTimeout);
629 }
630
640 const ISequenceCollectionT<BYTE>& cdb, int iReadSize, DWORD dwTimeout = SCSI_CMD_TIMEOUT_MS_LONG)
641 {
642 CByteVector vb;
643 if ( ! m_hpScsi.IsNull() )
644 {
645 bool r = !! m_hpScsi->SendCommand(
646 cdb.ReferBuffer(), cdb.GetSize(), SCSI_CMD_DIR_READ, vb.GetBuffer(iReadSize), iReadSize, dwTimeout);
647 vb.ReleaseBuffer();
648 if ( r )
649 {
650 return vb;
651 }
652 }
653 vb.Invalid();
654 return vb;
655 }
656
666 const ISequenceCollectionT<BYTE>& cdb, const ISequenceCollectionT<BYTE>& d, DWORD dwTimeout = SCSI_CMD_TIMEOUT_MS_LONG)
667 {
668 if ( m_hpScsi.IsNull() ) { return false; }
669 return !! m_hpScsi->SendCommand(
670 cdb.ReferBuffer(), cdb.GetSize(), SCSI_CMD_DIR_WRITE, const_cast<BYTE*>(d.ReferBuffer()), d.GetSize(), dwTimeout);
671 }
672
681 CByteVector Send_ModeSense(BYTE pc, bool boIsDbd = false, DWORD dwTimeout = SCSI_CMD_TIMEOUT_MS_LONG)
682 {
683 CByteVector cdb;
684 cdb.SetSize(6);
685 cdb[0] = 0x1A; //ModeSense
686 cdb[1] = _BIT(3); //Block Descriptor は転送なし。
687 cdb[2] = pc;
688 cdb[4] = 4;
689 CByteVector r = SendCommandWithReadPhase(cdb, cdb[4], dwTimeout);
690 if ( r.GetSize() != 4 )
691 {
692 return r;
693 }
694 cdb[1] = static_cast<BYTE>((boIsDbd && r[3] == 8) ? 0 : _BIT(3));
695 cdb[4] = static_cast<BYTE>(4 + r[3] + r[0]);
696 return SendCommandWithReadPhase(cdb, cdb[4], dwTimeout);
697 }
698
705 CByteVector Send_Inquiry(DWORD dwTimeout = SCSI_CMD_TIMEOUT_MS_LONG)
706 {
707 CByteVector cdb;
708 cdb.SetSize(6);
709 cdb[0] = 0x12; //Inquiry
710 cdb[4] = 8;
711 CByteVector r = SendCommandWithReadPhase(cdb, cdb[4], dwTimeout);
712 if ( r.GetSize() != 8 )
713 {
714 return r;
715 }
716 cdb[4] = static_cast<BYTE>(5 + r[4]);
717 return SendCommandWithReadPhase(cdb, cdb[4], dwTimeout);
718 }
719
733 DWORD GetLastError(void)
734 {
735 return m_hpScsi.IsNull() ? 0 : m_hpScsi->GetLastError();
736 }
737
744 {
745 return m_hpScsi.IsNull() ? 0 : m_hpScsi->GetLastSystemError();
746 }
747
755 bool GetSense(PRISCSI::SCSI_COMMAND_SENSE& _sense)
756 {
757 if ( m_hpScsi.IsNull() ) { return false; }
758 m_hpScsi->GetSense(&_sense);
759 return true;
760 }
761
762 private:
765 CScsiHandle m_hpScsi;
766 };
767
768
769
784 {
785 public:
786
793 {
795 enum EType
796 {
801 };
802
804 virtual ~IListener(void) {}
805
813 virtual void OnProgress(EType eType, ULONGLONG ullPos, ULONGLONG ullAll) = 0;
814
829 virtual void OnStatus(PRIBUR::EDataDiscStatus eStatus) = 0;
830
838 virtual void OnFileStatus(int nFile, LPCWSTR lpszFileName, int nPercent) = 0;
839
846 virtual bool OnContinueBurn() = 0;
847 };
848
853 CDevice(PRIBUR::IDevice* P = NULL)
854 : m_hpDevice(P), m_dwWriteSpeed(0), m_boIsEject(true)
855 {
856 }
857
860 {
861 }
862
868 {
869 m_callbacker.SetListener(I);
870 }
871
877 void SetEjectMode(bool boIsEject)
878 {
879 m_boIsEject = boIsEject;
880 }
881
887 void Close(void)
888 {
889 m_hpDevice.Null();
890 }
891
898 bool IsValid(void) const
899 {
900 return ! m_hpDevice.IsNull();
901 }
902
907 DWORD GetLastError(void)
908 {
909 return m_hpDevice.IsNull() ? 0 : m_hpDevice->GetLastError();
910 }
911
917 PRIBUR::IDevice* operator->(void)
918 {
919 return m_hpDevice;
920 }
921
928 {
929 if ( m_hpDevice.IsNull() )
930 {
931 return CScsi();
932 }
933 return CScsi(m_hpDevice->GetScsiInterface());
934 }
935
942 bool IsMediaReady(DWORD dwTime = 0)
943 {
944 if ( m_hpDevice.IsNull() )
945 {
946 return false;
947 }
948 if ( dwTime == 0 )
949 {
950 return m_hpDevice->GetUnitReady() == DEVICE_ERROR_SUCCESS;
951 }
952 CTickCount tick;
953 while ( ! tick.IsPassed(dwTime) )
954 {
955 if ( m_hpDevice->GetUnitReady() == DEVICE_ERROR_SUCCESS )
956 {
957 return true;
958 }
959 ::Sleep(100);
960 }
961 return false;
962 }
963
972 {
973 if ( m_hpDevice.IsNull() )
974 {
975 return 0;
976 }
977 return m_hpDevice->GetMediaFreeSpace() * CDROM_BLOCKSIZE;
978 }
979
988 {
989 if ( m_hpDevice.IsNull() )
990 {
991 return false;
992 }
993 TRACE3("HasWritableMedia() %d,%d,%d\n",
994 m_hpDevice->GetMediaFreeSpace(), m_hpDevice->GetReWritePossible(), m_hpDevice->GetMediaIsReWritable());
995 if ( m_hpDevice->GetMediaFreeSpace() == 0 )
996 {
997 return false;
998 }
999 return m_hpDevice->GetReWritePossible() && m_hpDevice->GetMediaIsReWritable();
1000 }
1001
1010 {
1011 if ( m_hpDevice.IsNull() )
1012 {
1013 return false;
1014 }
1015 TRACE2("HasRewritableMedia() %d,%d\n", m_hpDevice->GetReWritePossible(), m_hpDevice->GetMediaIsReWritable());
1016 return m_hpDevice->GetReWritePossible() && m_hpDevice->GetMediaIsReWritable();
1017 }
1018
1044 PRIBUR::EMediaProfile GetMediaProfile(void)
1045 {
1046 if ( m_hpDevice.IsNull() )
1047 {
1048 return MP_UNKNOWN;
1049 }
1050 return m_hpDevice->GetMediaProfile();
1051 }
1052
1058 static CStr ToString(PRIBUR::EMediaProfile e)
1059 {
1060 CStr s;
1061 switch ( e )
1062 {
1063 default:
1064 case MP_UNKNOWN: break;
1065 case MP_CD_ROM: s = _T("CD-ROM"); break;
1066 case MP_CD_R: s = _T("CD-R"); break;
1067 case MP_CD_RW: s = _T("CD-RW"); break;
1068 case MP_DVD_ROM: s = _T("DVD-ROM"); break;
1069 case MP_DVD_MINUS_R_SEQ: s = _T("DVD-R"); break;
1070 case MP_DVD_RAM_RW: s = _T("DVD-RAM"); break;
1071 case MP_DVD_MINUS_RW_RO: //DVD-RW Restricted Overwrite -- Re-writable DVD formatted for restricted overwrite recording.
1072 case MP_DVD_MINUS_RW_SEQ: //DVD-RW Sequential Recording -- Re-writable DVD that can be recorded only sequentially.
1073 s = _T("DVD-RW"); break;
1074 case MP_DVD_MINUS_R_DL_SEQ: //DVD-R DL -- Write once DVD-R Double Layer 8.5GB that can be recorded sequentially.
1075 case MP_DVD_MINUS_R_DL_JUMP: //DVD-R DL -- Write once DVD-R Double Layer 8.5GB that can be recorded using layer jumping.
1076 s = _T("DVD-R DL"); break;
1077 case MP_DVD_PLUS_RW: s = _T("DVD+RW"); break;
1078 case MP_DVD_PLUS_R: s = _T("DVD+R"); break;
1079 case MP_DVD_PLUS_R_DL: s = _T("DVD+R DL"); break;
1080 #ifdef _TnbPrimoBurner_Used_V2
1081 case MP_BD_R_SRM:
1082 case MP_BD_R_SRM_POW:
1083 case MP_BD_R_RRM: s = _T("BD-R"); break;
1084 case MP_BD_RE: s = _T("BD-RE"); break;
1085 #endif
1086 }
1087 return s;
1088 }
1089
1096 {
1097 CDwordVector vdwSpeeds;
1098 if ( ! m_hpDevice.IsNull() )
1099 {
1100 PRIBUR::ISpeedCollection* pSpeeds = m_hpDevice->GetSupportedWriteSpeeds();
1101 loop ( i, pSpeeds->GetCount() )
1102 {
1103 PRIBUR::ISpeedDescriptor* pSpeed = pSpeeds->GetItem(i);
1104 vdwSpeeds.Add(pSpeed->GetTransferRateKB());
1105 pSpeed->Release();
1106 }
1107 pSpeeds->Release();
1108 }
1109 return vdwSpeeds;
1110 }
1111
1119 {
1120 if ( m_hpDevice.IsNull() )
1121 {
1122 return -1;
1123 }
1124 int nLastTrack = 0;
1125 PRIBUR::EMediaProfile mp = m_hpDevice->GetMediaProfile();
1126 if ( MP_DVD_PLUS_RW == mp || MP_DVD_MINUS_RW_RO == mp )
1127 {
1128 // DVD+RW and DVD-RW RO has only one session with one track
1129 if ( m_hpDevice->GetMediaFreeSpace() > 0 )
1130 {
1131 nLastTrack = 1;
1132 }
1133 }
1134 else
1135 {
1136 PRIBUR::READDISKINFO di;
1137 if ( m_hpDevice->ReadDiskInfo(&di) )
1138 {
1139 nLastTrack = di.wLastTrack;
1140 if ( DISK_STATUS_OPEN == di.eDiskStatus || DISK_STATUS_EMPTY == di.eDiskStatus )
1141 {
1142 nLastTrack--;
1143 }
1144 }
1145 }
1146 return nLastTrack;
1147 }
1148
1154 static double Get1xSpeed(bool boIsDvd)
1155 {
1156 return boIsDvd ? SPEED_DVD_1X_KB : SPEED_CD_1X_KB;
1157 }
1158
1165 DWORD GetWriteSpeed(void)
1166 {
1167 if ( m_hpDevice.IsNull() )
1168 {
1169 return 0;
1170 }
1171 if ( m_dwWriteSpeed == 0 )
1172 {
1173 return m_hpDevice->GetMaxWriteSpeedKB();
1174 }
1175 return m_dwWriteSpeed;
1176 }
1177
1183 void SetWriteSpeed(DWORD dw)
1184 {
1185 m_dwWriteSpeed = dw;
1186 }
1187
1202 bool Erase(EEraseType eType = ERASE_DISC)
1203 {
1204 if ( m_hpDevice.IsNull() )
1205 {
1206 return false;
1207 }
1208 PRIBUR::EMediaProfile mp = m_hpDevice->GetMediaProfile();
1209 if ( MP_DVD_MINUS_RW_SEQ != mp && MP_DVD_MINUS_RW_RO != mp && MP_CD_RW != mp )
1210 {
1211 //AfxMessageBox(_T("Erasing is supported on CD-RW and DVD-RW media only."), MB_OK);
1212 return false;
1213 }
1214 m_hpDevice->SetCallback13(&m_callbacker);
1215 m_hpDevice->SetCallback15(&m_callbacker);
1216 bool r = !! m_hpDevice->Erase13(eType);
1217 if ( m_boIsEject )
1218 {
1219 m_hpDevice->Eject(TRUE);
1220 }
1221 return r;
1222 }
1223
1232 bool Format(bool boIsQuick = false)
1233 {
1234 if ( m_hpDevice.IsNull() )
1235 {
1236 return false;
1237 }
1238 PRIBUR::EMediaProfile mp = m_hpDevice->GetMediaProfile();
1239 m_hpDevice->SetCallback13(&m_callbacker);
1240 m_hpDevice->SetCallback15(&m_callbacker);
1241 BOOL bRes = TRUE;
1242 switch ( mp )
1243 {
1244 case MP_CD_RW:
1245 bRes = !! m_hpDevice->Erase13(boIsQuick ? ERASE_MINIMAL : ERASE_DISC);
1246 break;
1247 case MP_DVD_MINUS_RW_RO:
1248 case MP_DVD_MINUS_RW_SEQ:
1249 bRes = m_hpDevice->Format(boIsQuick ? FT_DVD_MINUS_RW_QUICK : FT_DVD_MINUS_RW_FULL);
1250 break;
1251 case MP_DVD_PLUS_RW:
1252 switch ( m_hpDevice->GetBgFormatStatus() )
1253 {
1254 case BFS_NOT_FORMATTED:
1255 bRes = m_hpDevice->Format(FT_DVD_PLUS_RW_FULL, 0, false);
1256 break;
1257 case BFS_PARTIAL:
1258 bRes = m_hpDevice->Format(FT_DVD_PLUS_RW_RESTART, 0, false);
1259 break;
1260 default:
1261 return false;
1262 break;
1263 }
1264 break;
1265 default:
1266 return false;
1267 break;
1268 }
1269 if ( m_boIsEject )
1270 {
1271 m_hpDevice->Eject(TRUE);
1272 }
1273 return !! bRes;
1274 }
1275
1282 bool BurnImageFile(LPCTSTR lpszFile)
1283 {
1284 CDiscImage hpDataDisc;
1285 if ( ! m_PreBurn(hpDataDisc.operator->()) )
1286 {
1287 return false;
1288 }
1289 m_hpDevice->SetCallback13(&m_callbacker);
1290 m_hpDevice->SetCallback15(&m_callbacker);
1291 hpDataDisc->SetCallback14(&m_callbacker);
1292 bool r = !! hpDataDisc->WriteImageToDisc(CUnicode(lpszFile));
1293 if ( m_boIsEject )
1294 {
1295 m_hpDevice->Eject(TRUE);
1296 }
1297 return r;
1298 }
1299
1306 bool Burn(CDiscImage& dd)
1307 {
1308 PRIBUR::IDataDisc* pDataDisc = dd.operator->();
1309 if ( ! m_PreBurn(pDataDisc) )
1310 {
1311 return false;
1312 }
1313 m_hpDevice->SetCallback13(&m_callbacker);
1314 m_hpDevice->SetCallback15(&m_callbacker);
1315 pDataDisc->SetCallback14(&m_callbacker);
1316 bool r = true;
1317 while ( true )
1318 {
1319 if ( ! pDataDisc->WriteToDisc(TRUE) )
1320 {
1321 if ( DATACD_ERROR_CANNOT_LOAD_IMAGE_LAYOUT == pDataDisc->GetLastError() )
1322 {
1323 pDataDisc->SetLoadTrackLayout(0);
1324 continue;
1325 }
1326 else
1327 {
1328 r = false;
1329 }
1330 }
1331 break;
1332 }
1333 pDataDisc->SetCallback14(NULL);
1334 if ( m_boIsEject )
1335 {
1336 m_hpDevice->Eject(TRUE);
1337 }
1338 return r;
1339 }
1340
1341 private:
1342
1343 #ifndef _TnbDOXYGEN
1344
1348 class CCallBacker : public PRIBUR::IDeviceCallback13, public PRIBUR::IDeviceCallback15, public PRIBUR::IDataDiscCallback14
1349 {
1350 IListener* m_iListener;
1351 public:
1353 CCallBacker(void) : m_iListener(NULL) {}
1355 virtual ~CCallBacker(void) {}
1357 void SetListener(IListener* I)
1358 {
1359 m_iListener = I;
1360 }
1362 virtual void OnProgress(uint64_t ddwPos, uint64_t ddwAll)
1363 {
1364 TRACE3("OnProgress(%I64u,%I64u) %f%%\n", ddwPos, ddwAll, (double)(LONGLONG)((ddwPos * 100) / ddwAll) );
1365 if ( m_iListener != NULL )
1366 {
1367 m_iListener->OnProgress(IListener::BURN, ddwPos, ddwAll);
1368 }
1369 }
1371 virtual void OnStatus(PRIBUR::EDataDiscStatus eStatus)
1372 {
1373 TRACE1("OnStatus(%d)\n", eStatus);
1374 if ( m_iListener != NULL )
1375 {
1376 m_iListener->OnStatus(eStatus);
1377 }
1378 }
1380 virtual void OnFileStatus(int nFile, const tchar_t* pFileName, int nPercent)
1381 {
1382 nPercent = nPercent > 100 ? 100 : nPercent;
1383 TRACE3("No.%d %d%% [%s] \n", nFile, nPercent, CStr(pFileName));
1384 if ( m_iListener != NULL )
1385 {
1386 m_iListener->OnFileStatus(nFile, pFileName, nPercent);
1387 }
1388 }
1390 virtual bool_t OnContinueBurn()
1391 {
1392 TRACE0("OnContinueBurn()\n");
1393 if ( m_iListener != NULL )
1394 {
1395 return m_iListener->OnContinueBurn();
1396 }
1397 return true;
1398 }
1400 virtual void OnFormatProgress(double doProgress)
1401 {
1402 TRACE1("OnFormatProgress(%f%%)\n", doProgress);
1403 if ( m_iListener != NULL )
1404 {
1405 m_iListener->OnProgress(IListener::FORMAT, static_cast<DWORD>(doProgress) * 100, 10000);
1406 }
1407 }
1409 virtual void OnEraseProgress(double doProgress)
1410 {
1411 TRACE1("OnEraseProgress(%f%%)\n", doProgress);
1412 if ( m_iListener != NULL )
1413 {
1414 m_iListener->OnProgress(IListener::FORMAT, static_cast<DWORD>(doProgress * 100), 10000);
1415 }
1416 }
1418 virtual void OnWriteLeadIn(uint32_t dwBlocks, uint32_t dwAllBlocks)
1419 {
1420 TRACE2("OnWriteLeadIn(%u,%u)\n", dwBlocks, dwAllBlocks);
1421 if ( m_iListener != NULL )
1422 {
1423 m_iListener->OnProgress(IListener::WRITELEADIN, dwBlocks, dwAllBlocks);
1424 }
1425 }
1427 virtual void OnWriteLeadOut(uint32_t dwBlocks, uint32_t dwAllBlocks)
1428 {
1429 TRACE2("OnWriteLeadOut(%u,%u)\n", dwBlocks, dwAllBlocks);
1430 if ( m_iListener != NULL )
1431 {
1432 m_iListener->OnProgress(IListener::WRITELEADOUT, dwBlocks, dwAllBlocks);
1433 }
1434 }
1435 };
1436
1437 #endif _TnbDOXYGEN
1438
1441 CDeviceHandle m_hpDevice;
1442 DWORD m_dwWriteSpeed;
1443 bool m_boIsEject;
1444 CCallBacker m_callbacker;
1445
1450 bool m_PreBurn(PRIBUR::IDataDisc * pDataDisc)
1451 {
1452 if ( pDataDisc == NULL || m_hpDevice.IsNull() )
1453 {
1454 return false;
1455 }
1456 m_hpDevice->SetWriteSpeedKB(GetWriteSpeed());
1457 pDataDisc->SetDevice(m_hpDevice);
1458 EMediaProfile mp = m_hpDevice->GetMediaProfile();
1459 if ( mp == MP_DVD_PLUS_RW )
1460 {
1461 switch ( m_hpDevice->GetBgFormatStatus() )
1462 {
1463 case BFS_NOT_FORMATTED:
1464 m_hpDevice->Format(FT_DVD_PLUS_RW_FULL);
1465 break;
1466 case BFS_PARTIAL:
1467 m_hpDevice->Format(FT_DVD_PLUS_RW_RESTART);
1468 break;
1469 }
1470 }
1471 pDataDisc->SetCallback14(&m_callbacker);
1472 if ( mp == MP_CD_ROM || mp == MP_CD_R || mp == MP_CD_RW )
1473 {
1474 pDataDisc->SetSessionStartAddress(m_hpDevice->GetNewSessionStartAddress());
1475 pDataDisc->SetCacheSmallFiles(FALSE);
1476 // pDataDisc->SetCacheSmallFiles(m_ctx.bCacheSmallFiles);
1477 // if (m_ctx.bCacheSmallFiles)
1478 // {
1479 // pDataDisc->SetSmallFileSizeThreshold(m_ctx.dwSmallFileSize);
1480 // pDataDisc->SetSmallFilesCacheSize(m_ctx.dwSmallFilesCacheLimit);
1481 // }
1482 // Set write mode
1483 pDataDisc->SetWriteMethod(WRITE_METHOD_TAO);
1484 // if (!m_ctx.bRaw && (0 == m_ctx.nMode || 1 == m_ctx.nMode))
1485 // // Session-At-Once (also called Disc-At-Once)
1486 // pDataDisc->SetWriteMethod(WRITE_METHOD_SAO);
1487 // else if (m_ctx.bRaw)
1488 // // RAW Disc-At-Once
1489 // pDataDisc->SetWriteMethod(WRITE_METHOD_RAW_DAO);
1490 // else if (2 == m_ctx.nMode)
1491 // // Track-At-Once
1492 // pDataDisc->SetWriteMethod(WRITE_METHOD_TAO);
1493 // else
1494 // // Packet
1495 // pDataDisc->SetWriteMethod(WRITE_METHOD_PACKET);
1496 }
1497 else
1498 {
1499 pDataDisc->SetCacheSmallFiles(FALSE);
1500 // Set write mode
1501 pDataDisc->SetWriteMethod(WRITE_METHOD_DVD_INCR);
1502 // if (0 == m_ctx.nMode)
1503 // // DVD Disc-At-Once
1504 // pDataDisc->SetWriteMethod(WRITE_METHOD_DVD_DAO);
1505 // else if (1 == m_ctx.nMode)
1506 // // DVD Incremental
1507 // pDataDisc->SetWriteMethod(WRITE_METHOD_DVD_INCR);
1508 }
1509 // pDataDisc->SetSimulateBurn(m_ctx.bSimulate);
1510 pDataDisc->SetSimulateBurn(FALSE);
1511 // pDataDisc->SetCloseDisk(m_ctx.bCloseDisk);
1512 pDataDisc->SetCloseDisk(TRUE);
1513 return true;
1514 }
1515 };
1516
1517
1518 //-----------------------------------------
1519
1520
1522 CPrimoBurner(void) : m_pEngine(NULL), m_pEnumerator(NULL), m_iDeviceNumber(0)
1523 {
1524 }
1525
1528 {
1529 m_CloseEnumerator();
1530 if ( m_pEngine != NULL )
1531 {
1532 m_pEngine->Shutdown();
1533 m_pEngine->Release();
1534 m_pEngine = NULL;
1535 }
1536 }
1537
1547 int Initialize(bool boIsWritableOnly = true)
1548 {
1549 if ( ! m_InitEngine() )
1550 {
1551 return -1;
1552 }
1553 m_vDeviceNames.RemoveAll();
1554 m_CloseEnumerator();
1555 m_pEnumerator = m_pEngine->GetDevices();
1556 int iCount = m_pEnumerator->GetCount();
1557 if ( iCount <= 0 )
1558 {
1559 m_CloseEnumerator();
1560 return -1;
1561 }
1562 m_vDeviceNames.SetSize(iCount);
1563 int r = 0;
1564 for ( int i = 0; i < iCount; i++ )
1565 {
1566 PRIBUR::IDevice* pDevice = m_pEnumerator->GetItem(i);
1567 if ( pDevice != NULL )
1568 {
1569 if ( ! boIsWritableOnly || pDevice->GetWritePossible() )
1570 {
1571 CUnicode strDesc;
1572 LPWSTR P = strDesc.GetBuffer(256);
1573 memset(P, 0, 256 * sizeof(WCHAR));
1574 pDevice->GetDescription(P, 256);
1575 strDesc.ReleaseBuffer();
1576 int iLetter = pDevice->GetDriveLetter();
1577 m_vDeviceNames[i].Format(_T("%c:%s"), iLetter & 0xDF, CStr(strDesc));
1578 TRACE2("%d %s\n", i, m_vDeviceNames[i]);
1579 r++;
1580 }
1581 pDevice->Release();
1582 }
1583 }
1584 m_iDeviceNumber = r;
1585 return r;
1586 }
1587
1593 int GetFoundDeviceNumber(void) const
1594 {
1595 return m_iDeviceNumber;
1596 }
1597
1603 CStr GetFoundDeviceName(int iIndex) const
1604 {
1605 int c = 0;
1606 loop ( i, m_vDeviceNames.GetSize() )
1607 {
1608 const CStr& s = m_vDeviceNames[i];
1609 if ( ! s.IsEmpty() )
1610 {
1611 if ( c == iIndex )
1612 {
1613 return s;
1614 }
1615 c++;
1616 }
1617 }
1618 return CStr();
1619 }
1620
1627 CDevice CreateDevice(TCHAR tchLetter)
1628 {
1629 if ( m_pEnumerator == NULL )
1630 {
1631 Initialize();
1632 }
1633 loop ( i, m_vDeviceNames.GetSize() )
1634 {
1635 const CStr& s = m_vDeviceNames[i];
1636 if ( ! s.IsEmpty() && s[0] == (tchLetter & 0xDF) )
1637 {
1638 CDevice r(m_pEnumerator->GetItem(i));
1639 return r;
1640 }
1641 }
1642 return CDevice();
1643 }
1644
1645private:
1647 bool m_InitEngine(void)
1648 {
1649 if ( m_pEngine == NULL )
1650 {
1651 m_pEngine = hpCDE::CreateEngine();
1652 if ( ! m_pEngine->Initialize() && ! m_pEngine->Initialize(TRUE) )
1653 {
1654 return false;
1655 }
1656 }
1657 return true;
1658 }
1660 void m_CloseEnumerator(void)
1661 {
1662 if ( m_pEnumerator != NULL)
1663 {
1664 m_pEnumerator->Release();
1665 m_pEnumerator = NULL;
1666 }
1667 }
1668 PRIBUR::IEngine* m_pEngine;
1669 PRIBUR::IDeviceCollection* m_pEnumerator;
1670 CStrVector m_vDeviceNames;
1671 int m_iDeviceNumber;
1672};
1673
1674
1675
1676}; //TNB
1677
1678
1679
#define _BIT(X)
BIT演算
Definition: TnbDef.h:307
#define loop(VAR, CNT)
loop構文.
Definition: TnbDef.h:343
ファイル検索関係のヘッダ
ファイルネーム関係のヘッダ
文字列情報配列管理関係のヘッダ
経過時間管理関係のヘッダ
bool Next(void)
[検索] 次検索
const WIN32_FIND_DATA & Get(void) const
[取得] 検索情報取得
bool Start(LPCTSTR lpszPath, LPCTSTR lpszMask=_T("*.*"), EFindType type=ALL)
[検索] 検索開始
[ETC] コピー不可能スーパークラス.
Definition: TnbDef.h:599
ファイル検索クラス
ファイル名管理クラス
Definition: TnbFileName.h:59
ファイルタイム管理クラス
Definition: TnbTime.h:45
static CFileTimeEx GetCurrent(void)
[取得] 現在の時間
Definition: TnbTime.h:851
ポインタハンドルテンプレートベースクラス
bool IsNull(void) const
[確認] NULLチェック
PrimoBurner デバイス情報管理クラス
void SetWriteSpeed(DWORD dw)
[設定] 書込み速度設定
static double Get1xSpeed(bool boIsDvd)
[取得] 1×速度取得
PRIBUR::IDevice * operator->(void)
[取得] IDevice参照.
bool BurnImageFile(LPCTSTR lpszFile)
[書込] 書込み(イメージファイル指定)
PRIBUR::EMediaProfile GetMediaProfile(void)
[確認] メディア種確認
DWORD GetMediaFreeByte(void)
[取得] メディア空き容量
bool IsMediaReady(DWORD dwTime=0)
[確認] メディア確認
~CDevice(void)
デストラクタ
bool IsValid(void) const
[確認] 有効確認.
CDevice(PRIBUR::IDevice *P=NULL)
コンストラクタ
bool Format(bool boIsQuick=false)
[消去] フォーマット
bool Erase(EEraseType eType=ERASE_DISC)
[消去] イレース
void Close(void)
[処理] クローズ
static CStr ToString(PRIBUR::EMediaProfile e)
[取得] メディア種名取得
bool HasRewritableMedia(void)
[確認] 再書込み可能確認
bool Burn(CDiscImage &dd)
[書込] 書込み(CDiscImage 指定)
void SetListener(IListener *I)
[登録] リスナー登録
DWORD GetLastError(void)
[取得] エラーコード取得.
int GetLastCompleteTrack(void)
[取得] 最終トラック取得.
void SetEjectMode(bool boIsEject)
[登録] 処理後Eject設定.
CScsi CreateScsi(void)
[取得] SCSIインターフェース取得.
DWORD GetWriteSpeed(void)
[取得] 速度取得
CDwordVector GetSpeeds(void)
[取得] 書込み速度一覧.
bool HasWritableMedia(void)
[確認] 書込み可能確認
PrimoBurner ディスクイメージ情報管理クラス
bool AddSourceFromPath(LPCTSTR lpszName, LPCTSTR lpszImagePath=NULL)
[登録] ファイル群追加
void ResetFileImage(void)
[設定] ディスクイメージクリア
void SetDefaultParametersForDvd(LPCTSTR lpszVolume, EImageType eType=IMG_TYPE_UDF)
[設定] DVD用基本設定
PRIBUR::IDataDisc * operator->(void)
[取得] IDataDisc ポインタ参照
~CDiscImage(void)
デストラクタ
void SetDefaultParametersForCd(LPCTSTR lpszVolume, EImageType eType=IMG_TYPE_JOLIET, DWORD dwFlags=IC_NONE)
[設定] CD用基本設定
CDiscImage(void)
コンストラクタ
void SetBootableParameters(bool boIsBootableCd, EBootEmulation eEmu=BMT_NO_EMULATION, LPCTSTR lpszbootImageFile=NULL)
[設定] Bootable設定
bool CreateImageFile(LPCTSTR lpszFile)
[作成] イメージファイル作成.
bool AddSource(LPCTSTR lpszName, LPCTSTR lpszImagePath=NULL)
[登録] ファイル追加
void SetListener(IListener *I)
[登録] リスナー登録
DWORD GetLastError(void)
[取得] エラー種取得
PrimoBurner SCSI管理クラス
~CScsi(void)
デストラクタ
CByteVector SendCommandWithReadPhase(const ISequenceCollectionT< BYTE > &cdb, int iReadSize, DWORD dwTimeout=SCSI_CMD_TIMEOUT_MS_LONG)
[送信] CDB送信(読込みフェーズ付).
bool SendCommand(const ISequenceCollectionT< BYTE > &cdb, DWORD dwTimeout=SCSI_CMD_TIMEOUT_MS_LONG)
[送信] CDB送信.
bool GetSense(PRISCSI::SCSI_COMMAND_SENSE &_sense)
[取得] センスデータ取得
bool IsValid(void) const
[確認] 有効確認.
CByteVector Send_ModeSense(BYTE pc, bool boIsDbd=false, DWORD dwTimeout=SCSI_CMD_TIMEOUT_MS_LONG)
[送信] MODESENSE CDB送信.
CByteVector Send_Inquiry(DWORD dwTimeout=SCSI_CMD_TIMEOUT_MS_LONG)
[送信] INQUIRY CDB送信.
DWORD GetLastSystemError(void)
[取得] システムエラーコード取得
DWORD GetLastError(void)
[取得] エラー種取得
bool SendCommandWithWritePhase(const ISequenceCollectionT< BYTE > &cdb, const ISequenceCollectionT< BYTE > &d, DWORD dwTimeout=SCSI_CMD_TIMEOUT_MS_LONG)
[送信] CDB送信(書込みフェーズ付).
CScsi(PRISCSI::IScsiInterface *P=NULL)
コンストラクタ
PrimoBurner 管理クラス
CDevice CreateDevice(TCHAR tchLetter)
[選択] 対象デバイス選択
int GetFoundDeviceNumber(void) const
[取得] デバイス数取得
int Initialize(bool boIsWritableOnly=true)
[設定] 初期化
CPrimoBurner(void)
コンストラクタ
~CPrimoBurner(void)
デストラクタ
CStr GetFoundDeviceName(int iIndex) const
[取得] デバイス名取得
文字列管理テンプレート
Definition: TnbStr.h:74
bool IsEmpty(void) const
[確認] 空チェック
Definition: TnbStr.h:528
CStrT Left(size_t iSize) const
[作成] 範囲取得.
Definition: TnbStr.h:801
void ReleaseBuffer(void)
[操作] 割り当てたバッファを開放.
Definition: TnbStr.h:954
INT_PTR Find(TYP t, INDEX iFromIndex=0) const
[確認] 検索.
Definition: TnbStr.h:540
int Replace(TYP tOld, TYP tNew)
[処理] 文字置換.
Definition: TnbStr.h:1038
void Format(const TYP *lpszFormat,...)
[代入] 書式付き文字列代入.
Definition: TnbStr.h:359
CStrT Mid(INDEX iOffset, size_t iSize=INVALID_SIZE) const
[作成] 範囲取得.
Definition: TnbStr.h:766
TYP * GetBuffer(size_t iLength=0)
[操作] 書き込みバッファ要求.
Definition: TnbStr.h:914
経過時間管理クラス
Definition: TnbTickCount.h:57
bool IsPassed(DWORD dwTime) const
[確認] 経過確認.
Definition: TnbTickCount.h:114
virtual size_t GetSize(void) const
[取得] サイズ取得
Definition: TnbVector.h:368
TYP * GetBuffer(size_t size=0)
[操作] データアドレス取得
Definition: TnbVector.h:745
void ReleaseBuffer(void)
[操作] データの管理を元に戻す.
Definition: TnbVector.h:805
void Invalid(void)
[操作] 無効状態にする
Definition: TnbVector.h:604
virtual bool SetSize(size_t size)
[操作] サイズ指定
Definition: TnbVector.h:618
virtual bool RemoveAll(void)
[削除] 空化
Definition: TnbVector.h:565
virtual INDEX Add(const TYP &t)
[追加] 要素一つ追加.
Definition: TnbVector.h:383
TNB::CStrT< WCHAR > CUnicode
UNICODE文字列クラス
Definition: TnbStr.h:1771
TNB::CStrT< TCHAR > CStr
文字列クラス
Definition: TnbStr.h:1785
void IgnoreUnusedValue(const T &value)
[宣言] 参照しない値宣言.
Definition: TnbDef.h:434
TNB Library
Definition: TnbDoxyTitle.txt:2
ファイルタイム型.
Definition: TnbTime.h:893
PrimoBurner デバイス情報リスナーインターフェース
virtual bool OnContinueBurn()=0
[確認] 継続確認
virtual ~IListener(void)
デストラクタ
virtual void OnProgress(EType eType, ULONGLONG ullPos, ULONGLONG ullAll)=0
[通知] 進捗通知
virtual void OnFileStatus(int nFile, LPCWSTR lpszFileName, int nPercent)=0
[通知] ファイル処理
virtual void OnStatus(PRIBUR::EDataDiscStatus eStatus)=0
[通知] 処理状態通知
PrimoBurner ディスクイメージ情報リスナーインターフェース
virtual ~IListener(void)
デストラクタ
virtual void OnFileStatus(int nFile, LPCWSTR lpszFileName, int nPercent)=0
[通知] ファイル処理
virtual const TYP * ReferBuffer(void) const =0
[取得] データアドレス取得.
virtual size_t GetSize(void) const =0
[取得] 要素数取得.