30#if defined(___PRIMO_TCHAR_T) | defined(__PRIMO_CHAR_T)
31 #error hpCDE.h will be included previously.
33#define ___PRIMO_TCHAR_T
34typedef wchar_t tchar_t;
35#define ___PRIMO_CHAR_T
36typedef wchar_t char_t;
40 #define deprecated dllexport
46#pragma comment(lib,"hpCDEU.lib")
47#pragma comment(lib,"DataCDU.lib")
51 #define _TnbPrimoBurner_Used_V2
54 #pragma comment(lib,"HfsU.lib")
68#define PRIBUR ::primo::burner
70#ifdef _TnbPrimoBurner_Used_V2
71 #define PRISCSI ::primo::scsi
73 #define PRISCSI ::primo::burner
94 template<
typename T>
struct TPhReleasePointerT
96 void operator()(T P) { P->Release(); }
140 virtual void OnFileStatus(
int nFile, LPCWSTR lpszFileName,
int nPercent) = 0;
144 CDiscImage(
void) : m_hpDataDisc(hpCDE::CreateDataDisc()), m_hpDataFile(hpCDE::CreateDataFile())
146 m_hpDataFile->SetDirectory(TRUE);
147 m_hpDataFile->SetFilePath(L
"\\");
148 m_hpDataFile->SetLongFilename(L
"\\");
162 m_callbacker.SetListener(I);
181 return m_hpDataDisc.IsNull() ? 0 : m_hpDataDisc->GetLastError();
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);
219 bool boIsBootableCd, EBootEmulation eEmu = BMT_NO_EMULATION, LPCTSTR lpszbootImageFile = NULL)
221 m_hpDataDisc->SetBootable(boIsBootableCd);
222 m_hpDataDisc->SetBootEmulation(eEmu);
223 m_hpDataDisc->SetBootImageFile(
CUnicode(lpszbootImageFile));
243 bool AddSource(LPCTSTR lpszName, LPCTSTR lpszImagePath = NULL)
245 CAppendFile a(lpszName);
246 return m_SetLayout(a.Execute(m_hpDataFile, m_hpDataDisc->GetImageType(), lpszImagePath));
259 CAppendPath a(lpszName);
260 return m_SetLayout(a.Execute(m_hpDataFile, m_hpDataDisc->GetImageType(), lpszImagePath));
272 m_hpDataDisc->SetCallback14(&m_callbacker);
275 bool r = !! m_hpDataDisc->CreateImageFile(s);
278 TRACE1(
"err - %d\n", m_hpDataDisc->GetLastError() - SCSI_SENSE_ERROR_BASE );
292 class CCallBacker :
public PRIBUR::IDataDiscCallback14
294 IListener* m_iListener;
297 CCallBacker(
void) : m_iListener(NULL) {}
299 virtual ~CCallBacker(
void) {}
306 virtual void OnFileStatus(
int nFile,
const tchar_t* pFileName,
int nPercent)
308 nPercent = (nPercent > 100) ? 100 : nPercent;
309 TRACE3(
"No.%d %d%% [%s] \n", nFile, nPercent,
CStr(pFileName));
310 if ( m_iListener != NULL )
312 m_iListener->OnFileStatus(nFile, pFileName, nPercent);
316 virtual bool_t OnContinueBurn(
void) {
return true; }
318 virtual void OnProgress(uint64_t ddwPos, uint64_t ddwAll) {}
320 virtual void OnStatus(EDataDiscStatus eStatus) {}
327 CDataDiscHandle m_hpDataDisc;
328 CDataFileHandle m_hpDataFile;
329 CCallBacker m_callbacker;
335 CStr strAlternateFileName;
340 TFileInfo(
const WIN32_FIND_DATA& fd) {
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;
351 CStr GetFileName(
void)
const {
355 CStr GetAlternateFileName(
void)
const {
356 return strAlternateFileName.
Left(12);
360 return timeLastWrite;
365 class CAbstractAppender
368 bool m_Dig(
const CDataFileHandle& hpFile, DWORD dwImageType,
const CStr& strImagePath)
372 return OnFound(hpFile, dwImageType);
374 CStr s1 = strImagePath;
376 int f = strImagePath.
Find(_T(
'\\'));
377 if ( f < 0 ) { f = strImagePath.
Find(_T(
'/')); }
380 s1 = strImagePath.
Left(f);
381 s2 = strImagePath.
Mid(f + 1);
384 return m_Dig(hpFile, dwImageType, s2);
387 CDataFileHandle F = hpFile->Find(
CUnicode(_T(
"/") + s1));
390 F = hpCDE::CreateDataFile();
392 fd.boHasHidden =
false;
393 fd.strAlternateFileName = s1;
396 SetDataFile(F,
true, s1, dwImageType, fd);
397 if ( ! m_Dig(F, dwImageType, s2) )
405 if ( ! m_Dig(F, dwImageType, s2) )
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)
420 if ( ! OnSetup() ) {
return false; }
421 CStr str = lpszImagePath;
422 return m_Dig(hpFile, dwImageType, str);
432 static void SetDataFile(
433 PRIBUR::IDataFile* _pFile,
bool boDir, LPCTSTR lpszFilePath, DWORD dwImageType,
const TFileInfo& fd)
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
442 _pFile->SetCreationTime(&ft);
444 _pFile->SetFileTime(&fd.GetFileTime());
450 class CAppendFile :
public CAbstractAppender
452 DEFSUPER(CAbstractAppender);
454 TFileInfo m_fileInfo;
457 CAppendFile(LPCTSTR lpszFullPath) : m_strFullPath(lpszFullPath) {}
459 virtual bool OnSetup(
void)
462 if ( ! fn.IsExist() || fn.IsDirectory() )
466 m_fileInfo.boHasHidden = fn.IsHidden();
467 m_fileInfo.timeLastWrite = fn.GetLastWriteTime();
468 m_fileInfo.strAlternateFileName = fn.GetShortName();
469 m_fileInfo.strFileName = fn.GetFileName();
474 virtual bool OnFound(
const CDataFileHandle& hpFile, DWORD dwImageType)
476 CDataFileHandle F = hpCDE::CreateDataFile();
477 SetDataFile(F,
false, m_strFullPath, dwImageType, m_fileInfo);
484 class CAppendPath :
public CAbstractAppender
486 DEFSUPER(CAbstractAppender);
489 bool m_AddTree(PRIBUR::IDataFile* pFile, DWORD dwImageType, LPCTSTR lpszPath)
492 if ( ff.
Start(lpszPath, _T(
"\\*")) )
496 CStr strFileName = ff->cFileName;
498 strFullPath.
Format(_T(
"%s\\%s"), lpszPath, strFileName);
499 if ( (ff->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0 )
502 CDataFileHandle F = pFile->Find(
CUnicode(_T(
"/") + strFileName));
505 F = hpCDE::CreateDataFile();
506 _super::SetDataFile(F,
true, strFileName, dwImageType, TFileInfo(ff.
Get()));
507 if ( ! m_AddTree(F, dwImageType, strFullPath) )
515 if ( ! m_AddTree(F, dwImageType, strFullPath) )
524 CDataFileHandle F = hpCDE::CreateDataFile();
525 _super::SetDataFile(F,
false, strFullPath, dwImageType, TFileInfo(ff.
Get()));
528 }
while ( ff.
Next() );
534 CAppendPath(LPCTSTR lpszPath) : m_strPath(lpszPath) {}
536 virtual bool OnSetup(
void)
539 return ff.
Start(m_strPath, _T(
"\\*"));
542 virtual bool OnFound(
const CDataFileHandle& hpFile, DWORD dwImageType)
544 return m_AddTree(hpFile, dwImageType, m_strPath);
554 bool m_SetLayout(
bool boIsSet)
558 if ( boIsSet && m_hpDataDisc->SetImageLayout11(m_hpDataFile) )
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);
568 catch(PRIBUR::EDataDiscError& error)
598 CScsi(PRISCSI::IScsiInterface* P = NULL) : m_hpScsi(P)
615 return ! m_hpScsi.
IsNull();
627 if ( m_hpScsi.
IsNull() ) {
return false; }
628 return !! m_hpScsi->SendCommand(cdb.
ReferBuffer(), cdb.
GetSize(), SCSI_CMD_DIR_UNSPECIFIED, NULL, 0, dwTimeout);
643 if ( ! m_hpScsi.
IsNull() )
645 bool r = !! m_hpScsi->SendCommand(
668 if ( m_hpScsi.
IsNull() ) {
return false; }
669 return !! m_hpScsi->SendCommand(
694 cdb[1] =
static_cast<BYTE
>((boIsDbd && r[3] == 8) ? 0 :
_BIT(3));
695 cdb[4] =
static_cast<BYTE
>(4 + r[3] + r[0]);
716 cdb[4] =
static_cast<BYTE
>(5 + r[4]);
735 return m_hpScsi.
IsNull() ? 0 : m_hpScsi->GetLastError();
745 return m_hpScsi.
IsNull() ? 0 : m_hpScsi->GetLastSystemError();
757 if ( m_hpScsi.
IsNull() ) {
return false; }
758 m_hpScsi->GetSense(&_sense);
765 CScsiHandle m_hpScsi;
829 virtual void OnStatus(PRIBUR::EDataDiscStatus eStatus) = 0;
838 virtual void OnFileStatus(
int nFile, LPCWSTR lpszFileName,
int nPercent) = 0;
854 : m_hpDevice(P), m_dwWriteSpeed(0), m_boIsEject(true)
869 m_callbacker.SetListener(I);
879 m_boIsEject = boIsEject;
900 return ! m_hpDevice.IsNull();
909 return m_hpDevice.IsNull() ? 0 : m_hpDevice->GetLastError();
929 if ( m_hpDevice.IsNull() )
933 return CScsi(m_hpDevice->GetScsiInterface());
944 if ( m_hpDevice.IsNull() )
950 return m_hpDevice->GetUnitReady() == DEVICE_ERROR_SUCCESS;
955 if ( m_hpDevice->GetUnitReady() == DEVICE_ERROR_SUCCESS )
973 if ( m_hpDevice.IsNull() )
977 return m_hpDevice->GetMediaFreeSpace() * CDROM_BLOCKSIZE;
989 if ( m_hpDevice.IsNull() )
993 TRACE3(
"HasWritableMedia() %d,%d,%d\n",
994 m_hpDevice->GetMediaFreeSpace(), m_hpDevice->GetReWritePossible(), m_hpDevice->GetMediaIsReWritable());
995 if ( m_hpDevice->GetMediaFreeSpace() == 0 )
999 return m_hpDevice->GetReWritePossible() && m_hpDevice->GetMediaIsReWritable();
1011 if ( m_hpDevice.IsNull() )
1015 TRACE2(
"HasRewritableMedia() %d,%d\n", m_hpDevice->GetReWritePossible(), m_hpDevice->GetMediaIsReWritable());
1016 return m_hpDevice->GetReWritePossible() && m_hpDevice->GetMediaIsReWritable();
1046 if ( m_hpDevice.IsNull() )
1050 return m_hpDevice->GetMediaProfile();
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:
1072 case MP_DVD_MINUS_RW_SEQ:
1073 s = _T(
"DVD-RW");
break;
1074 case MP_DVD_MINUS_R_DL_SEQ:
1075 case MP_DVD_MINUS_R_DL_JUMP:
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
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;
1098 if ( ! m_hpDevice.IsNull() )
1100 PRIBUR::ISpeedCollection* pSpeeds = m_hpDevice->GetSupportedWriteSpeeds();
1101 loop ( i, pSpeeds->GetCount() )
1103 PRIBUR::ISpeedDescriptor* pSpeed = pSpeeds->GetItem(i);
1104 vdwSpeeds.
Add(pSpeed->GetTransferRateKB());
1120 if ( m_hpDevice.IsNull() )
1125 PRIBUR::EMediaProfile mp = m_hpDevice->GetMediaProfile();
1126 if ( MP_DVD_PLUS_RW == mp || MP_DVD_MINUS_RW_RO == mp )
1129 if ( m_hpDevice->GetMediaFreeSpace() > 0 )
1136 PRIBUR::READDISKINFO di;
1137 if ( m_hpDevice->ReadDiskInfo(&di) )
1139 nLastTrack = di.wLastTrack;
1140 if ( DISK_STATUS_OPEN == di.eDiskStatus || DISK_STATUS_EMPTY == di.eDiskStatus )
1156 return boIsDvd ? SPEED_DVD_1X_KB : SPEED_CD_1X_KB;
1167 if ( m_hpDevice.IsNull() )
1171 if ( m_dwWriteSpeed == 0 )
1173 return m_hpDevice->GetMaxWriteSpeedKB();
1175 return m_dwWriteSpeed;
1185 m_dwWriteSpeed = dw;
1202 bool Erase(EEraseType eType = ERASE_DISC)
1204 if ( m_hpDevice.IsNull() )
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 )
1214 m_hpDevice->SetCallback13(&m_callbacker);
1215 m_hpDevice->SetCallback15(&m_callbacker);
1216 bool r = !! m_hpDevice->Erase13(eType);
1219 m_hpDevice->Eject(TRUE);
1234 if ( m_hpDevice.IsNull() )
1238 PRIBUR::EMediaProfile mp = m_hpDevice->GetMediaProfile();
1239 m_hpDevice->SetCallback13(&m_callbacker);
1240 m_hpDevice->SetCallback15(&m_callbacker);
1245 bRes = !! m_hpDevice->Erase13(boIsQuick ? ERASE_MINIMAL : ERASE_DISC);
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);
1251 case MP_DVD_PLUS_RW:
1252 switch ( m_hpDevice->GetBgFormatStatus() )
1254 case BFS_NOT_FORMATTED:
1255 bRes = m_hpDevice->Format(FT_DVD_PLUS_RW_FULL, 0,
false);
1258 bRes = m_hpDevice->Format(FT_DVD_PLUS_RW_RESTART, 0,
false);
1271 m_hpDevice->Eject(TRUE);
1285 if ( ! m_PreBurn(hpDataDisc.operator->()) )
1289 m_hpDevice->SetCallback13(&m_callbacker);
1290 m_hpDevice->SetCallback15(&m_callbacker);
1291 hpDataDisc->SetCallback14(&m_callbacker);
1292 bool r = !! hpDataDisc->WriteImageToDisc(
CUnicode(lpszFile));
1295 m_hpDevice->Eject(TRUE);
1308 PRIBUR::IDataDisc* pDataDisc = dd.operator->();
1309 if ( ! m_PreBurn(pDataDisc) )
1313 m_hpDevice->SetCallback13(&m_callbacker);
1314 m_hpDevice->SetCallback15(&m_callbacker);
1315 pDataDisc->SetCallback14(&m_callbacker);
1319 if ( ! pDataDisc->WriteToDisc(TRUE) )
1321 if ( DATACD_ERROR_CANNOT_LOAD_IMAGE_LAYOUT == pDataDisc->GetLastError() )
1323 pDataDisc->SetLoadTrackLayout(0);
1333 pDataDisc->SetCallback14(NULL);
1336 m_hpDevice->Eject(TRUE);
1348 class CCallBacker :
public PRIBUR::IDeviceCallback13,
public PRIBUR::IDeviceCallback15,
public PRIBUR::IDataDiscCallback14
1350 IListener* m_iListener;
1353 CCallBacker(
void) : m_iListener(NULL) {}
1355 virtual ~CCallBacker(
void) {}
1362 virtual void OnProgress(uint64_t ddwPos, uint64_t ddwAll)
1364 TRACE3(
"OnProgress(%I64u,%I64u) %f%%\n", ddwPos, ddwAll, (
double)(LONGLONG)((ddwPos * 100) / ddwAll) );
1365 if ( m_iListener != NULL )
1371 virtual void OnStatus(PRIBUR::EDataDiscStatus eStatus)
1373 TRACE1(
"OnStatus(%d)\n", eStatus);
1374 if ( m_iListener != NULL )
1376 m_iListener->OnStatus(eStatus);
1380 virtual void OnFileStatus(
int nFile,
const tchar_t* pFileName,
int nPercent)
1382 nPercent = nPercent > 100 ? 100 : nPercent;
1383 TRACE3(
"No.%d %d%% [%s] \n", nFile, nPercent,
CStr(pFileName));
1384 if ( m_iListener != NULL )
1386 m_iListener->OnFileStatus(nFile, pFileName, nPercent);
1390 virtual bool_t OnContinueBurn()
1392 TRACE0(
"OnContinueBurn()\n");
1393 if ( m_iListener != NULL )
1395 return m_iListener->OnContinueBurn();
1400 virtual void OnFormatProgress(
double doProgress)
1402 TRACE1(
"OnFormatProgress(%f%%)\n", doProgress);
1403 if ( m_iListener != NULL )
1405 m_iListener->OnProgress(
IListener::FORMAT,
static_cast<DWORD
>(doProgress) * 100, 10000);
1409 virtual void OnEraseProgress(
double doProgress)
1411 TRACE1(
"OnEraseProgress(%f%%)\n", doProgress);
1412 if ( m_iListener != NULL )
1414 m_iListener->OnProgress(
IListener::FORMAT,
static_cast<DWORD
>(doProgress * 100), 10000);
1418 virtual void OnWriteLeadIn(uint32_t dwBlocks, uint32_t dwAllBlocks)
1420 TRACE2(
"OnWriteLeadIn(%u,%u)\n", dwBlocks, dwAllBlocks);
1421 if ( m_iListener != NULL )
1427 virtual void OnWriteLeadOut(uint32_t dwBlocks, uint32_t dwAllBlocks)
1429 TRACE2(
"OnWriteLeadOut(%u,%u)\n", dwBlocks, dwAllBlocks);
1430 if ( m_iListener != NULL )
1441 CDeviceHandle m_hpDevice;
1442 DWORD m_dwWriteSpeed;
1444 CCallBacker m_callbacker;
1450 bool m_PreBurn(PRIBUR::IDataDisc * pDataDisc)
1452 if ( pDataDisc == NULL || m_hpDevice.IsNull() )
1457 pDataDisc->SetDevice(m_hpDevice);
1458 EMediaProfile mp = m_hpDevice->GetMediaProfile();
1459 if ( mp == MP_DVD_PLUS_RW )
1461 switch ( m_hpDevice->GetBgFormatStatus() )
1463 case BFS_NOT_FORMATTED:
1464 m_hpDevice->Format(FT_DVD_PLUS_RW_FULL);
1467 m_hpDevice->Format(FT_DVD_PLUS_RW_RESTART);
1471 pDataDisc->SetCallback14(&m_callbacker);
1472 if ( mp == MP_CD_ROM || mp == MP_CD_R || mp == MP_CD_RW )
1474 pDataDisc->SetSessionStartAddress(m_hpDevice->GetNewSessionStartAddress());
1475 pDataDisc->SetCacheSmallFiles(FALSE);
1483 pDataDisc->SetWriteMethod(WRITE_METHOD_TAO);
1499 pDataDisc->SetCacheSmallFiles(FALSE);
1501 pDataDisc->SetWriteMethod(WRITE_METHOD_DVD_INCR);
1510 pDataDisc->SetSimulateBurn(FALSE);
1512 pDataDisc->SetCloseDisk(TRUE);
1522 CPrimoBurner(
void) : m_pEngine(NULL), m_pEnumerator(NULL), m_iDeviceNumber(0)
1529 m_CloseEnumerator();
1530 if ( m_pEngine != NULL )
1532 m_pEngine->Shutdown();
1533 m_pEngine->Release();
1549 if ( ! m_InitEngine() )
1554 m_CloseEnumerator();
1555 m_pEnumerator = m_pEngine->GetDevices();
1556 int iCount = m_pEnumerator->GetCount();
1559 m_CloseEnumerator();
1562 m_vDeviceNames.
SetSize(iCount);
1564 for (
int i = 0; i < iCount; i++ )
1566 PRIBUR::IDevice* pDevice = m_pEnumerator->GetItem(i);
1567 if ( pDevice != NULL )
1569 if ( ! boIsWritableOnly || pDevice->GetWritePossible() )
1573 memset(P, 0, 256 *
sizeof(WCHAR));
1574 pDevice->GetDescription(P, 256);
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]);
1584 m_iDeviceNumber = r;
1595 return m_iDeviceNumber;
1608 const CStr& s = m_vDeviceNames[i];
1629 if ( m_pEnumerator == NULL )
1635 const CStr& s = m_vDeviceNames[i];
1636 if ( ! s.
IsEmpty() && s[0] == (tchLetter & 0xDF) )
1638 CDevice r(m_pEnumerator->GetItem(i));
1647 bool m_InitEngine(
void)
1649 if ( m_pEngine == NULL )
1651 m_pEngine = hpCDE::CreateEngine();
1652 if ( ! m_pEngine->Initialize() && ! m_pEngine->Initialize(TRUE) )
1660 void m_CloseEnumerator(
void)
1662 if ( m_pEnumerator != NULL)
1664 m_pEnumerator->Release();
1665 m_pEnumerator = NULL;
1668 PRIBUR::IEngine* m_pEngine;
1669 PRIBUR::IDeviceCollection* m_pEnumerator;
1671 int m_iDeviceNumber;
#define loop(VAR, CNT)
loop構文.
const WIN32_FIND_DATA & Get(void) const
[取得] 検索情報取得
bool Start(LPCTSTR lpszPath, LPCTSTR lpszMask=_T("*.*"), EFindType type=ALL)
[検索] 検索開始
static CFileTimeEx GetCurrent(void)
[取得] 現在の時間
bool IsNull(void) const
[確認] NULLチェック
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)
[確認] メディア確認
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 ポインタ参照
void SetDefaultParametersForCd(LPCTSTR lpszVolume, EImageType eType=IMG_TYPE_JOLIET, DWORD dwFlags=IC_NONE)
[設定] CD用基本設定
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)
[取得] エラー種取得
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)
コンストラクタ
CDevice CreateDevice(TCHAR tchLetter)
[選択] 対象デバイス選択
int GetFoundDeviceNumber(void) const
[取得] デバイス数取得
int Initialize(bool boIsWritableOnly=true)
[設定] 初期化
CPrimoBurner(void)
コンストラクタ
~CPrimoBurner(void)
デストラクタ
CStr GetFoundDeviceName(int iIndex) const
[取得] デバイス名取得
bool IsEmpty(void) const
[確認] 空チェック
CStrT Left(size_t iSize) const
[作成] 範囲取得.
void ReleaseBuffer(void)
[操作] 割り当てたバッファを開放.
INT_PTR Find(TYP t, INDEX iFromIndex=0) const
[確認] 検索.
int Replace(TYP tOld, TYP tNew)
[処理] 文字置換.
void Format(const TYP *lpszFormat,...)
[代入] 書式付き文字列代入.
CStrT Mid(INDEX iOffset, size_t iSize=INVALID_SIZE) const
[作成] 範囲取得.
TYP * GetBuffer(size_t iLength=0)
[操作] 書き込みバッファ要求.
bool IsPassed(DWORD dwTime) const
[確認] 経過確認.
virtual size_t GetSize(void) const
[取得] サイズ取得
TYP * GetBuffer(size_t size=0)
[操作] データアドレス取得
void ReleaseBuffer(void)
[操作] データの管理を元に戻す.
void Invalid(void)
[操作] 無効状態にする
virtual bool SetSize(size_t size)
[操作] サイズ指定
virtual bool RemoveAll(void)
[削除] 空化
virtual INDEX Add(const TYP &t)
[追加] 要素一つ追加.
TNB::CStrT< WCHAR > CUnicode
UNICODE文字列クラス
TNB::CStrT< TCHAR > CStr
文字列クラス
void IgnoreUnusedValue(const T &value)
[宣言] 参照しない値宣言.
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
[通知] 処理状態通知
@ WRITELEADOUT
LeadOut書込み中
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
[取得] 要素数取得.