⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cfileimpdrvnt.h

📁 PGP8.0源码 请认真阅读您的文件包然后写出其具体功能
💻 H
字号:
/*____________________________________________________________________________
		Copyright (C) 2002 PGP Corporation
        All rights reserved.

        $Id: CFileImpDrvNT.h,v 1.5 2002/11/21 18:42:55 wjb Exp $
____________________________________________________________________________*/

#ifndef Included_CFileImpDrvNT_h	// [
#define Included_CFileImpDrvNT_h

#include "pgpClassesConfig.h"
#include "CFileImp.h"

_PGP_BEGIN

// Class CFileImpDrvNT

class CFileImpDrvNT : public CFileImp
{
	friend class CPFLImpFactoryDrvNT;

public:
	enum {kSlashChar = '\\'};

private:
	CFileImpDrvNT();
	~CFileImpDrvNT();

	CComboError	GetLength(PGPUInt64& length) const;
	CComboError	GetUniqueFileId(PGPUInt64& fileId) const;

	CComboError	SetIsCompressed(PGPBoolean isCompressed);
	CComboError	SetLength(PGPUInt64 length);

	void		Flush();

	CComboError	Open(const char *path, PGPUInt32 flags);
	CComboError	Close();
	CComboError	Delete(const char *path);
	CComboError	Move(const char *oldPath, const char *newPath);

	CComboError	Read(void *buf, PGPUInt64 pos, 
		PGPUInt32 nBytes) const;
	CComboError	Write(const void *buf, PGPUInt64 pos, 
		PGPUInt32 nBytes);// const;

private:
	HANDLE	mFileHandle;

	ERESOURCE	mNewPagingIoResource;
	PERESOURCE	mPOldPagingIoResource;
	PERESOURCE	*mPPPagingIoResource;

	CComboError	ReplacePagingIoResource();
	void		RestorePagingIoResource();

	void	SafeReplaceResource(PERESOURCE& pOldResource, 
		PERESOURCE pNewResource);

	PGPBoolean	IsSlashChar(char c) const
	{
		return (c == kSlashChar);
	}

	PGPBoolean	IsUNCPath(const char *path) const;

	CComboError CloseAndReopen();
};

_PGP_END

#endif	// ] Included_CFileImpDrvNT_h

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -