您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ ExtractFile函数代码示例

51自学网 2021-06-01 20:40:11
  C++
这篇教程C++ ExtractFile函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中ExtractFile函数的典型用法代码示例。如果您正苦于以下问题:C++ ExtractFile函数的具体用法?C++ ExtractFile怎么用?C++ ExtractFile使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了ExtractFile函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: GetItem

//---------------------------------------------//  nsZipArchive::Test//---------------------------------------------nsresult nsZipArchive::Test(const char *aEntryName){  nsZipItem* currItem;  if (aEntryName) // only test specified item  {    currItem = GetItem(aEntryName);    if (!currItem)      return ZIP_ERR_FNF;    //-- don't test (synthetic) directory items    if (currItem->isDirectory)      return ZIP_OK;    return ExtractFile(currItem, 0, 0);  }  // test all items in archive  for (int i = 0; i < ZIP_TABSIZE; i++) {    for (currItem = mFiles[i]; currItem; currItem = currItem->next) {      //-- don't test (synthetic) directory items      if (currItem->isDirectory)        continue;      nsresult rv = ExtractFile(currItem, 0, 0);      if (rv != ZIP_OK)        return rv;#if defined STANDALONE && defined XP_WIN      ProcessWindowsMessages();#endif    }  }  return ZIP_OK;}
开发者ID:ahadzi,项目名称:celtx,代码行数:35,


示例2: ExtractDBCFiles

void ExtractDBCFiles(int locale, bool basicLocale){    printf("Extracting dbc files.../n");    std::set<std::string> dbcfiles;    // get DBC file list    for(ArchiveSet::iterator i = gOpenArchives.begin(); i != gOpenArchives.end();++i)    {        vector<string> files;        (*i)->GetFileListTo(files);        for (vector<string>::iterator iter = files.begin(); iter != files.end(); ++iter)            if (iter->rfind(".dbc") == iter->length() - strlen(".dbc"))                    dbcfiles.insert(*iter);    }    std::string path = output_path;    path += "/dbc/";    CreateDir(path);    if(!basicLocale)    {        path += langs[locale];        path += "/";        CreateDir(path);    }    // extract Build info file    {        string mpq_name = std::string("component.wow-") + langs[locale] + ".txt";        string filename = path + mpq_name;        ExtractFile(mpq_name.c_str(), filename);    }    // extract DBCs    uint32 count = 0;    for (set<string>::iterator iter = dbcfiles.begin(); iter != dbcfiles.end(); ++iter)    {        string filename = path;        filename += (iter->c_str() + strlen("DBFilesClient//"));        if(FileExists(filename.c_str()))            continue;        if (ExtractFile(iter->c_str(), filename))            ++count;    }    printf("Extracted %u DBC files/n/n", count);}
开发者ID:93RNounen,项目名称:mangosbot,代码行数:49,


示例3: CreateResourceLock

void*           CreateResourceLock(int LockNumber){    char            lockname[_MAX_PATH];    char            mapname[_MAX_PATH];    ResourceLock_t* lock = (ResourceLock_t*)Alloc(sizeof(ResourceLock_t));    ExtractFile(g_Mapname, mapname);    safe_snprintf(lockname, _MAX_PATH, "%d%s", LockNumber, mapname);    lock->Mutex = CreateMutex(NULL, FALSE, lockname);    if (lock->Mutex == NULL)    {        LPVOID          lpMsgBuf;        Log("lock->Mutex is NULL! [%s]", lockname);        FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |                      FORMAT_MESSAGE_FROM_SYSTEM |                      FORMAT_MESSAGE_IGNORE_INSERTS,                      NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) & lpMsgBuf, 0, NULL);        Error((LPCTSTR)lpMsgBuf);    }    WaitForSingleObject(lock->Mutex, INFINITE);    return lock;}
开发者ID:bmk10,项目名称:sing-engine,代码行数:27,


示例4: ExtractFootprintFiles

//// Function to extract all footprint files from a package reader.//// Parameters:// packageReader - Instance of IAppxPackageReader over the Appx package whose//                 footprint files are to be extracted.// outputPath - Path of the folder where all extracted footprint files should//              be placed.//HRESULT ExtractFootprintFiles(    _In_ IAppxPackageReader* packageReader,    _In_ LPCWSTR outputPath){    HRESULT hr = S_OK;    wprintf(L"/nExtracting footprint files from the package/n");    for (int i = 0; SUCCEEDED(hr) && (i < FootprintFilesCount); i++)    {        IAppxFile* footprintFile = NULL;        hr = packageReader->GetFootprintFile(FootprintFilesType[i], &footprintFile);        if (hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND))        {            // Some footprint files are optional, it is normal for the GetFootprintFile            // call to fail when the file is not present.            wprintf(L"/nThe package does not contain a %s./n", FootprintFilesName[i]);            hr = S_OK;        }        else if (SUCCEEDED(hr))        {            hr = ExtractFile(footprintFile, outputPath);        }        if (footprintFile != NULL)        {            footprintFile->Release();            footprintFile = NULL;        }    }    return hr;}
开发者ID:9578577,项目名称:Windows-classic-samples,代码行数:42,


示例5: ExtractAll

void ExtractAll(){	TVITEM t; int i, nl; char *s; HTREEITEM hn, hm; FILE *log;	//log = fopen("exalltest.txt", "w");	if(!file) return;	nl = TreeView_GetCount(htree);	t.mask = TVIF_PARAM;	t.hItem = TreeView_GetChild(htree, TVI_ROOT); // First item	for(i = 0; i < nl; i++)	{		TreeView_GetItem(htree, &t);		s = GetItemPath(t.hItem);		if(!s) {MessageBox(hwnd, "GetItemPath pathbuf overflow!", title, 16); break;}		if(t.lParam != -1)		{			EnsureDirectoriesArePresent(s);			ExtractFile(t.lParam, s);			//fprintf(log, "FILE ");		}//else	fprintf(log, " DIR ");		//fprintf(log, "%i: %s/n", i, s);		hn = TreeView_GetChild(htree, t.hItem);		if(!hn) hn = TreeView_GetNextSibling(htree, t.hItem);		if(!hn)		{			hn = t.hItem;gns:			hn = TreeView_GetParent(htree, hn);			if(!hn) break;			hm = TreeView_GetNextSibling(htree, hn);			if(!hm) goto gns;			hn = hm;		}		t.hItem = hn;	}	//fclose(log);}
开发者ID:AdrienTD,项目名称:wktools,代码行数:35,


示例6: load_pgp_sdk

BOOL load_pgp_sdk(int type, int id) {	int r; char t[MAX_PATH];	pgpVer = 0;	if( isVista ){		sprintf(t,"%s//pgpsdkw.dll",TEMP);		ExtractFile(t,type,id);		hpgpsdk = LoadLibraryA(t);	}	else {		hRS_pgp = FindResource( g_hInst, MAKEINTRESOURCE(id), MAKEINTRESOURCE(type) );		pRS_pgp = (PBYTE) LoadResource( g_hInst, hRS_pgp ); LockResource( pRS_pgp );		hpgpsdk = MemLoadLibrary( pRS_pgp );	}	if (hpgpsdk) {		if( isVista )	load_pgpsdk_dll(hpgpsdk);		else			load_pgpsdk_mem(hpgpsdk);		r = p_pgp_init();		if(r) {			pgpVer = p_pgp_get_version();			return r;		}		if( isVista ){			FreeLibrary(hpgpsdk);		}		else {			MemFreeLibrary(hpgpsdk);			UnlockResource( pRS_pgp );			FreeResource( pRS_pgp );		}	}	return 0;}
开发者ID:TonyAlloa,项目名称:miranda-dev,代码行数:34,


示例7: ExtractDBCFiles

void ExtractDBCFiles(){    printf("Extracting dbc files.../n");    std::set<std::string> dbcfiles;    // get DBC file list    for (ArchiveSet::iterator i = gOpenArchives.begin(); i != gOpenArchives.end(); ++i)    {        vector<string> files;        (*i)->GetFileListTo(files);        for (vector<string>::iterator iter = files.begin(); iter != files.end(); ++iter)            if (iter->rfind(".dbc") == iter->length() - strlen(".dbc"))                dbcfiles.insert(*iter);    }    std::string path = output_path;    path += "/dbc/";    CreateDir(path);    // extract DBCs    int count = 0;    for (set<string>::iterator iter = dbcfiles.begin(); iter != dbcfiles.end(); ++iter)    {        string filename = path;        filename += (iter->c_str() + strlen("DBFilesClient//"));        if (ExtractFile(iter->c_str(), filename))            ++count;    }    printf("Extracted %u DBC files/n/n", count);}
开发者ID:cmangos,项目名称:mangos-classic,代码行数:32,


示例8: ExtractFdmCs

LPCSTR ExtractFdmCs (LPCSTR psz){	TCHAR szFile [MAX_PATH];	lstrcpy (szFile, g_tmpDir);	lstrcat (szFile, _T("//fdmcs.dat"));	psz = ExtractFile (psz, szFile);	return psz;}
开发者ID:naroya,项目名称:freedownload,代码行数:8,


示例9: ExtractFdmCsIcon

LPCSTR ExtractFdmCsIcon (LPCSTR psz){	TCHAR szIco [MAX_PATH];	lstrcpy (szIco, g_tmpDir);	lstrcat (szIco, _T ("//fdmcs.ico"));	psz = ExtractFile (psz, szIco, TRUE);	return psz;}
开发者ID:naroya,项目名称:freedownload,代码行数:8,


示例10: DoJob_Step5

LPCSTR DoJob_Step5 (LPCSTR psz){	char szFile [MAX_PATH];	strcpy (szFile, _szFDMPath);	strcat (szFile, "fdmcs.dat");	psz = ExtractFile (psz, szFile);	return psz;}
开发者ID:DragonZX,项目名称:fdm2,代码行数:8,


示例11: ExtractDBCFiles

void ExtractDBCFiles(int locale, bool basicLocale){    printf("Extracting dbc files.../n");    std::set<std::string> dbcfiles;    // get DBC file list    ArchiveSetBounds archives = GetArchivesBounds();    for (ArchiveSet::const_iterator i = archives.first; i != archives.second; ++i)    {        AppendDBCFileListTo(*i, dbcfiles);        AppendDB2FileListTo(*i, dbcfiles);    }    std::string path = output_path;    path += "/dbc/";    CreateDir(path);    if (!basicLocale)    {        path += langs[locale];        path += "/";        CreateDir(path);    }    // extract Build info file    {        std::string mpq_name = std::string("component.wow-") + langs[locale] + ".txt";        std::string filename = path + mpq_name;        ExtractFile(mpq_name.c_str(), filename);    }    // extract DBCs    int count = 0;    for (std::set<std::string>::iterator iter = dbcfiles.begin(); iter != dbcfiles.end(); ++iter)    {        std::string filename = path;        filename += (iter->c_str() + strlen("DBFilesClient//"));        if (ExtractFile(iter->c_str(), filename))            ++count;    }    printf("Extracted %u DBC/DB2 files/n/n", count);}
开发者ID:BooYoods,项目名称:cmangos-wod,代码行数:44,


示例12: ExtractScheme

			void						CURI::Parse(const std::string& uri)			{				_uri = uri;				_scheme			= ExtractScheme();				_directories	= ExtractDirectories();				_file			= ExtractFile();				_extension		= ExtractExtension();				_path			= ExtractPath();				//_query			= ExtractQuery();			}
开发者ID:the13620,项目名称:aoofwm-vfs,代码行数:10,


示例13: ExtractAction

void ExtractAction(void){    DWORD dwPos;    dwPos = ListView_GetNextItem(hListView, -1, LVNI_SELECTED);    if (dwPos == -1)        MessageBoxA(NULL, "Load a file first", "ERROR", 0);    else        ExtractFile(&sFile, dwPos);}
开发者ID:w4kfu,项目名称:homm3_fun,代码行数:10,


示例14: Mix_Linked_Version

bool C4MusicFileSDL::Play(bool loop){	const SDL_version * link_version = Mix_Linked_Version();	if (link_version->major < 1	    || (link_version->major == 1 && link_version->minor < 2)	    || (link_version->major == 1 && link_version->minor == 2 && link_version->patch < 7))	{		// Check existance and try extracting it		if (!FileExists(FileName)) if (!ExtractFile())				// Doesn't exist - or file is corrupt			{				LogF("Error reading %s", FileName);				return false;			}		// Load		Music = Mix_LoadMUS(SongExtracted ? Config.AtTempPath(C4CFN_TempMusic2) : FileName);		// Load failed		if (!Music)		{			LogF("SDL_mixer: %s", SDL_GetError());			return false;		}		// Play Song		if (Mix_PlayMusic(Music, loop? -1 : 1) == -1)		{			LogF("SDL_mixer: %s", SDL_GetError());			return false;		}	}	else	{		// Load Song		// Fixme: Try loading this from the group incrementally for less lag		size_t filesize;		if (!C4Group_ReadFile(FileName, &Data, &filesize))		{			LogF("Error reading %s", FileName);			return false;		}		// Mix_FreeMusic frees the RWop		Music = Mix_LoadMUS_RW(SDL_RWFromConstMem(Data, filesize));		if (!Music)		{			LogF("SDL_mixer: %s", SDL_GetError());			return false;		}		if (Mix_PlayMusic(Music, loop? -1 : 1) == -1)		{			LogF("SDL_mixer: %s", SDL_GetError());			return false;		}	}	return true;}
开发者ID:Meowtimer,项目名称:openclonk,代码行数:54,


示例15: GetNumItems

			void File::ExtractToFolder( const BString & Folder )			{				int iItems = GetNumItems();				for ( int i = 0; i < iItems; i++ )				{					BString FileName = GetFileName( i );					BString LocalFolder = String::File::GetStripFilename( FileName );					Bootil::File::CreateFolder( Folder + "/" + LocalFolder );					ExtractFile( i, Folder + "/" + FileName );				}			}
开发者ID:AlVar009,项目名称:bootil,代码行数:12,


示例16: CatalogPage

static void CatalogPage(FILE *ifile, unsigned short page){	TCatalog catalog;	int i,k,fpos;	fpos = page * PAGE_LENGTH;	fseek (ifile, fpos, SEEK_SET);	k = fread (catalog.page, 1, PAGE_LENGTH, ifile);	for (i = 0; i < FILEMAP_LENGTH; i++)	{		ExtractFile(ifile, catalog.filemap[i]);	}}
开发者ID:ngospina,项目名称:SOLOTools,代码行数:13,


示例17: DoJob_Step4

LPCSTR DoJob_Step4 (LPCSTR psz){	if (_dwFlags & FC_ADDBUTTONTOIE)	{		char szFile [MAX_PATH];				strcpy (szFile, _szFDMPath);		strcat (szFile, "fdmcsiebtn.ico");		psz = ExtractFile (psz, szFile);	}	if (_dwFlags & FC_ADDDOWNLOADS)	{		DWORD dwDLCount = *((LPDWORD) psz);		psz += sizeof (DWORD);		while (dwDLCount--)		{			char szURL [10000], szReferer [10000], szComment [10000];			DWORD dwSize;			dwSize = *((LPDWORD) psz);			psz += sizeof (DWORD);			CopyMemory (szURL, psz, dwSize);			szURL [dwSize] = 0;			psz += dwSize;			dwSize = *((LPDWORD) psz);			psz += sizeof (DWORD);			CopyMemory (szReferer, psz, dwSize);			szReferer [dwSize] = 0;			psz += dwSize;			dwSize = *((LPDWORD) psz);			psz += sizeof (DWORD);			CopyMemory (szComment, psz, dwSize);			szComment [dwSize] = 0;			psz += dwSize;			BOOL bAutoStart = *((LPBOOL) psz);			psz += sizeof (BOOL);			AddURLToDownload (szURL, szReferer, szComment, bAutoStart);		}	}	return psz;}
开发者ID:DragonZX,项目名称:fdm2,代码行数:50,


示例18: ExtractDBCFiles

void ExtractDBCFiles(int l, bool basicLocale){    printf("Extracting dbc files.../n");    SFILE_FIND_DATA foundFile;    memset(&foundFile, 0, sizeof(foundFile));    HANDLE listFile = SFileFindFirstFile(LocaleMpq, "DBFilesClient//*dbc", &foundFile, NULL);    HANDLE dbcFile = NULL;    uint32 count = 0;    if (listFile)    {        std::string outputPath = output_path;        outputPath += "/dbc/";        CreateDir(outputPath);        if (!basicLocale)        {            outputPath += Locales[l];            outputPath += "/";            CreateDir(outputPath);        }        std::string filename;        do        {            if (!SFileOpenFileEx(LocaleMpq, foundFile.cFileName, SFILE_OPEN_PATCHED_FILE, &dbcFile))            {                printf("Unable to open file %s in the archive/n", foundFile.cFileName);                continue;            }            filename = foundFile.cFileName;            filename = outputPath + filename.substr(filename.rfind('//') + 1);            if (FileExists(filename.c_str()))                continue;            if (ExtractFile(dbcFile, filename.c_str()))                ++count;            SFileCloseFile(dbcFile);        } while (SFileFindNextFile(listFile, &foundFile));        SFileFindClose(listFile);    }    printf("Extracted %u DBC files/n/n", count);}
开发者ID:Agyla,项目名称:ArkCORE4,代码行数:49,


示例19: ExtractCameraFiles

void ExtractCameraFiles(int locale, bool basicLocale){    printf("Extracting camera files.../n");    DBCFile camdbc("DBFilesClient//CinematicCamera.dbc");    if (!camdbc.open())    {        printf("Unable to open CinematicCamera.dbc. Camera extract aborted./n");        return;    }    // get camera file list from DBC    std::vector<std::string> camerafiles;    size_t cam_count = camdbc.getRecordCount();    for (size_t i = 0; i < cam_count; ++i)    {        std::string camFile(camdbc.getRecord(i).getString(1));        size_t loc = camFile.find(".mdx");        if (loc != std::string::npos)            camFile.replace(loc, 4, ".m2");        camerafiles.push_back(std::string(camFile));    }    std::string path = output_path;    path += "/Cameras/";    CreateDir(path);    if (!basicLocale)    {        path += langs[locale];        path += "/";        CreateDir(path);    }    // extract M2s    uint32 count = 0;    for (std::string thisFile : camerafiles)    {        std::string filename = path;        filename += (thisFile.c_str() + strlen("Cameras//"));        if (boost::filesystem::exists(filename))            continue;        if (ExtractFile(thisFile.c_str(), filename))            ++count;    }    printf("Extracted %u camera files/n", count);}
开发者ID:martial69320,项目名称:cerberus,代码行数:49,


示例20:

BOOL C4MusicFileMID::Play(BOOL loop)	{	// check existance	if(!FileExists(FileName))		// try extracting it		if(!ExtractFile())			// doesn't exist - or file is corrupt			return FALSE;	// Play Song	PlayMidi(SongExtracted ? Config.AtTempPath(C4CFN_TempMusic2) : FileName, Application.hWindow);	return TRUE;	}
开发者ID:Marko10-000,项目名称:clonk-rage,代码行数:15,


示例21: ExtractFdmCsIeBtnIfRequired

LPCSTR ExtractFdmCsIeBtnIfRequired (LPCSTR psz){	if (_dwFlags & FC_ADDBUTTONTOIE)	{		TCHAR szFile [MAX_PATH];				lstrcpy (szFile, g_tmpDir);		lstrcat (szFile, _T("//fdmcsiebtn.ico"));		psz = ExtractFile (psz, szFile);	}	return psz;}
开发者ID:naroya,项目名称:freedownload,代码行数:15,


示例22: ExtractPayloadFiles

//// Function to extract all payload files from a package reader.//// Parameters:// packageReader - Instance of IAppxPackageReader over the Appx package whose//                 payload files are to be extracted.// outputPath - Path of the folder where all extracted payload files should be//              placed.//HRESULT ExtractPayloadFiles(    _In_ IAppxPackageReader* packageReader,    _In_ LPCWSTR outputPath){    HRESULT hr = S_OK;    IAppxFilesEnumerator* payloadFiles = NULL;    wprintf(L"/nExtracting payload files from the package/n");    // Get an enumerator of all payload files from the package reader and iterate    // through all files.    hr = packageReader->GetPayloadFiles(&payloadFiles);    if (SUCCEEDED(hr))    {        BOOL hasCurrent = FALSE;        hr = payloadFiles->GetHasCurrent(&hasCurrent);        while (SUCCEEDED(hr) && hasCurrent)        {            IAppxFile* payloadFile = NULL;            hr = payloadFiles->GetCurrent(&payloadFile);            if (SUCCEEDED(hr))            {                hr = ExtractFile(payloadFile, outputPath);            }            if (SUCCEEDED(hr))            {                hr = payloadFiles->MoveNext(&hasCurrent);            }            if (payloadFile != NULL)            {                payloadFile->Release();                payloadFile = NULL;            }        }    }    if (payloadFiles != NULL)    {        payloadFiles->Release();        payloadFiles = NULL;    }    return hr;}
开发者ID:9578577,项目名称:Windows-classic-samples,代码行数:56,


示例23: CopyFile

void WorkThread::run(){	std::wstring srcDevInfo = m_srcPath + L"//DeviceInfo";	std::wstring dstDevInfo = m_dstPath + L"//DeviceInfo";	CopyFile(srcDevInfo.c_str(), dstDevInfo.c_str(), FALSE);	srcDevInfo = m_srcPath + L"//Device_Info.xml";	dstDevInfo = m_dstPath + L"//Device_Info.xml";	CopyFile(srcDevInfo.c_str(), dstDevInfo.c_str(), FALSE);	if ( m_extractFile )		ExtractFile();	if ( m_mergeFile )		ExtractImage();}
开发者ID:yzx65,项目名称:AppParser,代码行数:19,


示例24: DoJob_Step3

LPCSTR DoJob_Step3 (LPCSTR psz){	char szIco [MAX_PATH];	strcpy (szIco, _szFDMPath);	strcat (szIco, "fdmcs.ico");	psz = ExtractFile (psz, szIco, TRUE);	if (_dwFlags & (FC_ADDLINKTOFAVOR | FC_ADDLINKTOSTARTMENU))	{			}	if (_dwFlags & FC_MODIFYHOMEPAGE)	{		DWORD dw = 0;		DWORD dwSize = sizeof (dw);		RegQueryValueEx (_hFDMKey, "HPageDo", NULL, NULL, (LPBYTE)&dw, &dwSize);		if (dw == 0)			_dwFlags &= ~FC_MODIFYHOMEPAGE;	}	if (_dwFlags & FC_MODIFYHOMEPAGE)	{		HKEY hKey;		RegOpenKey (HKEY_CURRENT_USER, "Software//Microsoft//Internet Explorer//Main", &hKey);		char sz [10000] = "about:blank";		DWORD dw = sizeof (sz);				if (ERROR_SUCCESS != RegQueryValueEx (				_hFDMKey, "CIEOP", NULL, NULL, (LPBYTE)sz, &dw))		{			RegQueryValueEx (hKey, "Start Page", NULL, NULL, (LPBYTE)sz, &dw);			RegSetValueEx (_hFDMKey, "CIEOP", 0, REG_SZ, (LPBYTE)sz, lstrlen (sz));		}		RegSetValueEx (hKey, "Start Page", 0, REG_SZ, (LPBYTE)_szCustSite, lstrlen (_szCustSite));		RegCloseKey (hKey);	}	return psz;}
开发者ID:DragonZX,项目名称:fdm2,代码行数:43,


示例25: TestOpenStorage_ExtractFiles

static int TestOpenStorage_ExtractFiles(const TCHAR * szStorage, const TCHAR * szTargetDir, const TCHAR * szListFile){    CASC_FIND_DATA FindData;    HANDLE hStorage;    HANDLE hFind;    bool bFileFound = true;    int nError = ERROR_SUCCESS;    // Open the storage directory    if(!CascOpenStorage(szStorage, 0, &hStorage))    {        assert(GetLastError() != ERROR_SUCCESS);        nError = GetLastError();    }    if(nError == ERROR_SUCCESS)    {        hFind = CascFindFirstFile(hStorage, "*", &FindData, szListFile);        if(hFind != INVALID_HANDLE_VALUE)        {            while(bFileFound)            {                // Extract the file                printf("Extracting: %s ...", FindData.szFileName);                nError = ExtractFile(hStorage, FindData.szFileName, szTargetDir, FindData.dwLocaleFlags);                printf((nError == ERROR_SUCCESS) ? "OK/n" : "Failed/n");                // Find the next file in CASC                bFileFound = CascFindNextFile(hFind, &FindData);            }            // Close the search handle            CascFindClose(hFind);        }    }    // Close storage and return    if(hStorage != NULL)        CascCloseStorage(hStorage);    return nError;}
开发者ID:Allowed,项目名称:CascLib,代码行数:41,


示例26: GetCurrentSelected

void CFileListView::ExtractSelect(){	UInt32 nIndex;	FileInfo *info = NULL;	char szPath[MAX_PATH];	if(m_pArchive == NULL)		return;	nIndex = GetCurrentSelected();	if(nIndex < m_FileStack.back()->Chlids.size())		info = &(m_FileStack.back()->Chlids[nIndex]);	if(info != NULL)	{		if(info->nFileSize > 0)		{			GetCurrentFileName(nIndex, szPath, MAX_PATH);			ExtractFile(szPath);		}		else		{			BROWSEINFO bi; 			bi.hwndOwner      = m_hWnd;			bi.pidlRoot       = NULL;			bi.pszDisplayName = NULL; 			bi.lpszTitle      = TEXT("请选择文件夹"); 			bi.ulFlags        = BIF_RETURNONLYFSDIRS | BIF_STATUSTEXT;			bi.lpfn           = NULL; 			bi.lParam         = 0;			bi.iImage         = 0; 			LPITEMIDLIST pidl = SHBrowseForFolder(&bi);			if (pidl == NULL)				return;			if (SHGetPathFromIDList(pidl, szPath))				ExtractFolder(info, NULL, szPath);		}	}}
开发者ID:huairen,项目名称:JArchive,代码行数:41,


示例27: fill_win32_filefunc64W

// ////////////////////////////////////////////////////////////////////////////////// @public @static 将指定 zip 解压至指定路径下//bool ZipTools::UnZip(LPCWSTR wzZipName, LPCWSTR wzDestPath){	//	// 检查指定文件和文件夹是否存在	//	if ( !FileTools::Exist(wzZipName) )	{		DebugTools::OutputDebugPrintfW(L"[ZipTools] [UnZip] File Not Exist. [%s]/r/n", wzZipName);		return false;	}	if ( !FileTools::Exist(wzDestPath) )	{		DebugTools::OutputDebugPrintfW(L"[ZipTools] [Zip] Path Not Exist. [%s]/r/n", wzDestPath);		return false;	}	// 打开 zip 文件	zlib_filefunc64_def ffunc;	fill_win32_filefunc64W(&ffunc);	unzFile uf = unzOpen2_64(wzZipName, &ffunc);	if ( NULL == uf )	{		DebugTools::OutputDebugPrintfW(			L"[ZipTools] [Zip] Open Zip File Failed.[%s]/r/n", wzZipName);	}	// 设置指定目录为工作目录	SetCurrentDirectoryW(wzDestPath);	// 释放文件	ExtractFile(uf);	unzClose(uf);	return true;}
开发者ID:sssooonnnggg,项目名称:LibSrn,代码行数:41,


示例28:

bool C4MusicFileMID::Play(bool loop){	// check existance	if (!FileExists(FileName))		// try extracting it		if (!ExtractFile())			// doesn't exist - or file is corrupt			return false;	// init fmusic	mod = FMUSIC_LoadSong(SongExtracted ? Config.AtTempPath(C4CFN_TempMusic2) : FileName);	if (!mod)	{		LogF("FMod: %s", FMOD_ErrorString(FSOUND_GetError()));		return false;	}	// Play Song	FMUSIC_PlaySong(mod);	return true;}
开发者ID:Meowtimer,项目名称:openclonk,代码行数:23,


示例29: ExtractDirectory

bool FileStorage::SearchFilesToExtract(const StringRef& searchPath, bool isRecursively /*= true*/, const StringRef& outDir /*= StringRef::Empty*/){	if (Path::IsDirectory(searchPath))	{		return ExtractDirectory(searchPath, nullptr, isRecursively, outDir);	}	else	{		if (Path::HasSearchPattern(searchPath))		{			List<HeapString> outFiles;			FileInfo fileInfo(searchPath);			auto dir = fileInfo.Directory();			auto* dirEntry = FindDirectory(dir);			RETURN_FALSE_IF_NULL(dirEntry);			return dirEntry->SearchFilesToExtract(fileInfo.FullName(), isRecursively, outDir);		}		else		{			return ExtractFile(searchPath, nullptr, outDir);		}	}}
开发者ID:johndpope,项目名称:Medusa,代码行数:23,


示例30: Log

BOOL C4MusicFileMID::Play(BOOL loop)	{	// check existance	if(!FileExists(FileName))		// try extracting it		if(!ExtractFile())			// doesn't exist - or file is corrupt			return FALSE;	// init fmusic	mod = FMUSIC_LoadSong(SongExtracted ? Config.AtTempPath(C4CFN_TempMusic2) : FileName);	if (!mod) 		{		sprintf(OSTR, "FMod: %s", FMOD_ErrorString(FSOUND_GetError()));	  Log(OSTR);		return FALSE;		}	// Play Song	FMUSIC_PlaySong(mod);	return TRUE;	}
开发者ID:Marko10-000,项目名称:clonk-rage,代码行数:24,



注:本文中的ExtractFile函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ ExtractFileName函数代码示例
C++ ExtractDestination函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。