亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? neroisodemo.h

?? NERO sdk,可以對光盤進行編程,刻錄
?? H
字號:
/******************************************************************************
|* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
|* ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
|* PARTICULAR PURPOSE.
|* 
|* Copyright 1995-2003 Ahead Software AG. All Rights Reserved.
|*-----------------------------------------------------------------------------
|* NeroSDK / Samples
|*
|* PROGRAM: NeroISODemo.cpp
|*
|* PURPOSE: This demo implementation supports storing of files
|*			or complete directory trees in the root directory
|*			of an ISO track. Each subdirectory is scanned while
|*			the Nero API builds its internal tree, so we don't
|*			have to build a tree ourselves.
|*
|*			However, the implementation of CNeroIsoHandle becomes
|*			very inefficient this way because each handle contains
|*			the full path. It would be better for trees with many
|*			files to use a tree and construct the full filename
|*			from going back in the tree to the root.
******************************************************************************/


#include "NeroIsoTrack.h"
#include <string>
#include <list>
#include <errno.h>
using namespace std;
#include <sys/types.h>
#include <sys/stat.h>
#include <io.h>

extern void Exit (int ret);

//
// This demo implementation supports storing of files
// or complete directory trees in the root directory
// of an ISO track. Each subdirectory is scanned while
// the Nero API builds its internal tree, so we don't
// have to build a tree ourselves.
//
// However, the implementation of CNeroIsoHandle becomes
// very inefficient this way because each handle contains
// the full path. It would be better for trees with many
// files to use a tree and construct the full filename
// from going back in the tree to the root.
//

//
// Reading is done with ordinary FILEs.
//
class CDemoReadCallback : public CNeroDataCallback
{
	FILE *m_pFile;
public:
	CDemoReadCallback (string sFullName)	// open file
	{
		m_pFile = fopen (sFullName.c_str (), "rb");
	}
	~CDemoReadCallback ()					// delete file
	{
		if (m_pFile) {
			fclose (m_pFile);
		}
	}
	virtual DWORD IOCallback (BYTE *pBuffer, DWORD dwLen)	// read from file
	{
		int read = 0;
	   
		if (m_pFile) {
			read = fread (pBuffer, 1, dwLen, m_pFile);
			if (read < 0) {
				perror ("fread");
			}
		}
		return read;
	}
	virtual BOOL EOFCallback ()		{ return m_pFile && feof (m_pFile); }		// calls map to standard functions directly
	virtual BOOL ErrorCallback ()	{
	   /* FIXME: no implementation for ferror() in crtdll.
	    * so no errors occur here :-) */
	   /*return m_pFile && ferror (m_pFile);*/
	   return 0;		
	}

	BOOL Okay () { return m_pFile != NULL; }									// initialized okay?
};

//
// This callback is created by this handle from the full name
// store in it:
//
class CDemoIsoHandle : public CNeroIsoHandle
{
	string m_sFullName;
public:
	CDemoIsoHandle (string sFullName) : m_sFullName (sFullName) { }
	virtual CNeroIsoHandle *Clone ()	{ return new CDemoIsoHandle (m_sFullName); }

	virtual int GetFileName (char *strBuffer, UINT nBufferSize)
	{
		// you can choose if files are read by Nero API or via callback
		#if 1

		// directly by API: give the name to the API
		if (nBufferSize) {
			strncpy (strBuffer, m_sFullName.c_str (), nBufferSize);
			strBuffer[nBufferSize - 1] = 0;
		}
		return m_sFullName.length ();

		#else

		// via callback: refuse to give away the name
		return 0;

		#endif
	}

	
	CNeroDataCallback *Open ()
	{
		CDemoReadCallback *pCallback = new CDemoReadCallback (m_sFullName);
		// opening it may have failed
		if (pCallback && !pCallback->Okay ()) {
			delete pCallback;
			pCallback = NULL;
		}
		return pCallback;
	}
};

//
// reads the file/directory infos and gives them to the API
//
class CDemoIsoEntry : public CNeroIsoEntry
{
	string	m_sFullName;		// name including full path
	string	m_sFileName;		// the name within the current directory
	__int64	m_i64Size;			// < 0 for directory, otherwise size of file 
	time_t	fileTime;

public:
	CDemoIsoEntry () { m_i64Size = -1; }
	CDemoIsoEntry (const char *strFullName) { this->SetName (strFullName); }
	
	void SetName (const char *strFullName)		// read infos and remember everything
	{
		struct _stati64 buf;
	   
		if (_stati64 (strFullName, 
			  &buf)) {
			perror (strFullName);
			Exit (10);
		}
		m_sFullName = strFullName;

		// find last occurance of either "/" or "\"
		const char *name = strrchr (strFullName, '/');
		const char *tmp = strrchr (strFullName, '\\');
		if (!name) {
			name = tmp;
		} else if (tmp) {
			if (tmp > name) {
				name = tmp;
			}
		}
		if (!name || !*name) {
			name = strFullName;
		} else {
			name++;
		}
		m_sFileName = name;
		m_i64Size = (buf.st_mode & _S_IFDIR) ? -1 : buf.st_size;

		fileTime=buf.st_mtime;
	}

	virtual CNeroIsoIterator * CreateDirectoryIterator();	// implemented below because we have to define CDemoIsoIterator first
	
	virtual const char *       GetName ()					{ return m_sFileName.c_str (); }
	virtual __int64            GetLength ()					{ return m_i64Size; }
	virtual BOOL GetEntryTime(tm *tm)
	{
		struct tm *time=localtime(&fileTime);
		if (time==NULL) 
			return FALSE;
		else
		{
			*tm=*time;
			return TRUE;
		}
	}
	virtual CNeroIsoHandle *   CreateHandle ()				{ return new CDemoIsoHandle (m_sFullName); }
};

//
// Our iterator implements both interfaces and thus returns a pointer
// to itself when asked for the current entry (but only while it really
// has information about a file).
//
class CDemoIsoIterator : public CNeroIsoIterator, public CDemoIsoEntry
{
	long m_lHandle;				// for searching with findfirst/next/close()
	_finddata_t m_FindData;		// the result of last call to findfirst/next()
	string m_sPath;				// the directory we are searching in
	BOOL m_bValid;				// we currently have valid information


	// The information about the current entry are stored in the base
	// class CDemoIsoEntry. FindData2Entry() sets them there:
	void FindData2Entry ()
	{
		// skip current and parent directory entries
		while (!strcmp (m_FindData.name, ".") || !strcmp (m_FindData.name, "..")) {
			this->Next ();
			if (!m_bValid) {
				// found end of directory, give up
				return;
			}
		}

		// build name
		string sFullName = m_sPath;
		sFullName += "\\";
		sFullName += m_FindData.name;

		// ask base class to analyze this name
		this->SetName (sFullName.c_str ());

		// base class would have quit if there was a problem,
		// so now we are fine
		m_bValid = TRUE;
	}

public:
	CDemoIsoIterator (const char *strPath) : m_sPath (strPath), m_bValid (FALSE)
	{
		// start searching this directory for any file
		string pattern = strPath;
		pattern += "\\*";
		m_lHandle = _findfirst (pattern.c_str (), &m_FindData);
		if (m_lHandle == -1) {
			perror (strPath);
			Exit (10);
		}

		// copy informations for first entry
		this->FindData2Entry ();
	}
	~CDemoIsoIterator () { _findclose (m_lHandle); }

	virtual CNeroIsoEntry *GetCurrentEntry () { return m_bValid ? this : NULL; }	// our base class _is_ the current entry if m_bValid is TRUE
	virtual void Next ()
	{
		// invalidate ourself
		m_bValid = FALSE;
		if (_findnext (m_lHandle, &m_FindData) == -1) {
			// quit unless the error indicates the end of the directory
			if (errno != ENOENT) {
				perror ("findnext");
				Exit (10);
			}
		} else {
			// copy new infos
			this->FindData2Entry ();
		}
	}
};

// now that CDemoIsoIterator is defined we can implement this function
CNeroIsoIterator * CDemoIsoEntry::CreateDirectoryIterator()
{
	return new CDemoIsoIterator (m_sFullName.c_str ());
};

//
// The root directory is implemented by a seperate class
// which has a list of entries that are traversed by
// a special iterator and also provides the other
// ISO track options.
//
class CDemoIsoTrack : public CNeroIsoTrack
{
	string m_sVolumeName;						// ISO volume name
	typedef list <CDemoIsoEntry> DemoList_t;	// type definition for storing them and
	DemoList_t m_Entries;						// all entries in the root directory themselves

	BOOL m_bUseJoliet;
	BOOL m_bUseMode2;
	BOOL m_bBurnISO;
	BOOL m_bBurnUDF;
	BOOL m_bReallocDVDVideoFiles;

	class CDemoRootIterator : public CNeroIsoIterator	// traverses any STL collection of CDemoIsoEntries
	{
		DemoList_t::iterator m_End;						// STL end marker
		DemoList_t::iterator m_Current;					// STL iterator

	public:
		CDemoRootIterator (DemoList_t &List) : m_End (List.end ()), m_Current (List.begin ()) { }
		virtual CNeroIsoEntry *GetCurrentEntry ()	{ return m_Current != m_End ? &(*m_Current) : NULL; }
		virtual void Next ()						{ m_Current++; }
	};

public:
	CDemoIsoTrack ()
	{
		m_bUseJoliet = TRUE;
		m_bUseMode2 = FALSE;
		m_bBurnISO = TRUE;
		m_bBurnUDF = FALSE;
		m_bReallocDVDVideoFiles = FALSE;
	}

	// modify settings for ISO track
	void SetVolumeName (const char *strVolumeName)	{ m_sVolumeName = strVolumeName; }
	void SetJoliet (BOOL bUseJoliet)				{ m_bUseJoliet = bUseJoliet; }
	void SetMode2 (BOOL bUseMode2)					{ m_bUseMode2 = bUseMode2; }
	void SetISO(BOOL b)								{ m_bBurnISO = b;}
	void SetUDF(BOOL b)								{ m_bBurnUDF = b;}
	void SetReallocDVDVideoFiles(BOOL b)			{ m_bReallocDVDVideoFiles = b;}

	// return settings
	virtual const char *       GetName ()					{ return m_sVolumeName.c_str (); }

	// add a file/directory - the base name is kept in the ISO track,
	// but the path is discarded, i.e. "C:\Dir1\Dir2" will be stored
	// as ":\Dir2" on the disc.
	void AddEntry (const char *strEntryName)		{ m_Entries.insert (m_Entries.end(), CDemoIsoEntry (strEntryName)); }

	// return new iterator
	virtual CNeroIsoIterator * CreateDirectoryIterator ()	{ return new CDemoRootIterator (m_Entries); }

    virtual DWORD              BurnOptions() 
	{
		return (m_bUseJoliet ? NCITEF_USE_JOLIET : 0)
			  |(m_bUseMode2 ? NCITEF_USE_MODE2 : 0)
			  |(m_bBurnISO ? NCITEF_CREATE_ISO_FS : 0)
			  |(m_bBurnUDF ? NCITEF_CREATE_UDF_FS : 0)
			  |(m_bReallocDVDVideoFiles ? NCITEF_DVDVIDEO_REALLOC : 0);
	}
};

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
97精品电影院| 欧美一区二区三区在线看| 久久精品99国产精品| 亚洲国产日日夜夜| 一区二区免费在线| 樱花草国产18久久久久| 亚洲自拍都市欧美小说| 午夜久久久久久电影| 男人的天堂亚洲一区| 极品美女销魂一区二区三区 | 日韩精品亚洲专区| 日韩极品在线观看| 经典三级一区二区| av在线不卡网| 日本乱码高清不卡字幕| 4438成人网| 久久精品一区蜜桃臀影院| 综合婷婷亚洲小说| 午夜在线电影亚洲一区| 久久99久国产精品黄毛片色诱| 国产一区二区免费视频| 成人av先锋影音| 欧美肥胖老妇做爰| 久久综合国产精品| 亚洲视频免费在线观看| 日本不卡免费在线视频| 国产福利91精品一区二区三区| 99在线精品一区二区三区| 欧美日韩精品免费观看视频| 精品国产精品网麻豆系列| 欧美国产一区视频在线观看| 亚洲一区二区三区国产| 久久97超碰国产精品超碰| 91丨porny丨在线| 日韩欧美你懂的| 亚洲色图第一区| 精品在线亚洲视频| 欧美性色黄大片| 中文无字幕一区二区三区| 亚洲电影视频在线| 国产精品 欧美精品| 欧美群妇大交群中文字幕| 国产精品久久国产精麻豆99网站| 五月天中文字幕一区二区| 成人在线视频首页| 日韩三级.com| 亚洲成人免费视频| 99久精品国产| 中文天堂在线一区| 精品在线免费观看| 91精品欧美福利在线观看| 一区在线播放视频| 国产成人综合视频| 欧美精品一区二区三区在线| 首页欧美精品中文字幕| 91麻豆免费在线观看| 欧美国产一区二区| 国产伦理精品不卡| 亚洲精品一区二区三区福利 | 国产欧美日韩在线观看| 免费欧美日韩国产三级电影| 欧美日韩日日夜夜| 亚洲综合激情网| 色综合久久久久综合99| 国产精品午夜久久| 91网站在线播放| 国产精品天干天干在线综合| 国产成人精品免费一区二区| 久久色.com| 国产成人精品午夜视频免费| 精品成人私密视频| 国产成人精品一区二区三区四区| 精品国产亚洲在线| 九九在线精品视频| 久久久综合九色合综国产精品| 精品中文字幕一区二区小辣椒| 日韩精品一区二区三区在线| 久久99久久99| 中文字幕欧美激情| 成人涩涩免费视频| 亚洲精品成人在线| 欧美日韩国产精选| 视频一区二区不卡| 精品少妇一区二区三区视频免付费 | 欧美激情综合在线| 成人手机电影网| 一区二区三区色| 欧美精品电影在线播放| 美脚の诱脚舐め脚责91 | 久久品道一品道久久精品| 国产福利一区在线| 亚洲柠檬福利资源导航| 91精品国产综合久久婷婷香蕉| 久久精品国产一区二区三 | 久久久www成人免费无遮挡大片 | 天天色天天爱天天射综合| 91精品国产入口| 国产精品18久久久久久vr | 欧美久久久久久久久| 免费人成精品欧美精品| 国产精品人妖ts系列视频| 91免费观看视频在线| 亚洲成年人网站在线观看| 精品人在线二区三区| 波多野结衣中文一区| 亚洲大片免费看| 久久精品视频免费| 91电影在线观看| 国产一区视频导航| 亚洲一线二线三线视频| 久久久久久久久久久黄色| 色欧美日韩亚洲| 久久精品国产77777蜜臀| 日韩美女精品在线| 日韩欧美一级二级三级久久久| 成人性生交大合| 免费精品99久久国产综合精品| 1000精品久久久久久久久| 日韩精品专区在线影院重磅| 99国内精品久久| 久久99精品一区二区三区| 亚洲一区二区在线播放相泽| 2020国产精品久久精品美国| 欧美日韩免费一区二区三区 | 亚洲狠狠爱一区二区三区| 欧美激情综合五月色丁香小说| 91精品视频网| 欧美亚洲国产一区二区三区va| 国产剧情一区在线| 全国精品久久少妇| 午夜精品爽啪视频| 最新国产精品久久精品| 久久精品视频免费| 日韩一卡二卡三卡国产欧美| 欧美三片在线视频观看| 99在线精品视频| www.欧美.com| 成人伦理片在线| 丰满少妇在线播放bd日韩电影| 精品在线免费视频| 久久成人免费日本黄色| 秋霞影院一区二区| 天堂精品中文字幕在线| 亚洲福利视频一区二区| 夜夜揉揉日日人人青青一国产精品 | 日韩亚洲欧美综合| 欧美一区二区三区在线观看 | 亚洲精品久久嫩草网站秘色| 国产精品久久久久久久久久免费看| 久久久综合九色合综国产精品| 久久婷婷成人综合色| 久久精品视频一区| 欧美极品少妇xxxxⅹ高跟鞋| 中文无字幕一区二区三区| 国产精品久久久久桃色tv| 国产精品久久久久久久久动漫 | 在线视频观看一区| 色琪琪一区二区三区亚洲区| 欧洲亚洲国产日韩| 7777女厕盗摄久久久| 欧美成人一区二区三区在线观看| 日韩欧美久久一区| 国产清纯白嫩初高生在线观看91| 欧美国产日韩精品免费观看| 成人免费一区二区三区在线观看| ...中文天堂在线一区| 一区二区三区在线视频观看58 | 床上的激情91.| 91成人在线精品| 9191精品国产综合久久久久久| 91精品国产全国免费观看| 久久综合久久综合九色| 中文字幕中文字幕一区| 亚洲一区二区三区三| 蜜臀av一级做a爰片久久| 国产精品88av| 欧美天堂一区二区三区| 日韩免费看的电影| 国产精品国产三级国产普通话蜜臀 | 乱一区二区av| 大白屁股一区二区视频| 欧美三电影在线| 精品播放一区二区| 亚洲乱码精品一二三四区日韩在线| 性做久久久久久| 成人国产精品免费| 日韩写真欧美这视频| 国产精品免费视频观看| 日本欧洲一区二区| 99国产精品久| 欧美变态口味重另类| 亚洲欧美日韩国产综合| 久久国产综合精品| 在线视频一区二区三区| 久久欧美一区二区| 日韩一区精品视频| 97久久精品人人爽人人爽蜜臀| 精品入口麻豆88视频| 一区二区三区在线播| 懂色中文一区二区在线播放|