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

📄 cfileimpdrv98.h

📁 可以实现对邮件的加密解密以及签名
💻 H
字号:
/*____________________________________________________________________________
		Copyright (C) 2002 PGP Corporation
        All rights reserved.

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

#ifndef Included_CFileImpDrv98_h	// [
#define Included_CFileImpDrv98_h

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

_PGP_BEGIN

// Class CFileImpDrv98

class CFileImpDrv98 : public CFileImp
{
	friend class CPFLImpFactoryDrv98;

private:
	CFileImpDrv98() : mRing0Handle(NULL), mInt21Handle(0) { }
	~CFileImpDrv98();

	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:
	PGPBoolean	mUseInt21;			// use int21 interface?

	HANDLE		mRing0Handle;		// Ring-0 file handle
	PGPUInt16	mInt21Handle;		// int21 file handle

	CComboError	GetLengthRing0(PGPUInt64& length) const;
	CComboError	GetLengthInt21(PGPUInt64& length) const;

	CComboError	OpenRing0(PGPUInt16 flags);
	CComboError	OpenInt21(PGPUInt16 flags);

	CComboError	CloseRing0();
	CComboError	CloseInt21();

	CComboError	SetFilePosInt21(PGPUInt32 pos) const;

	CComboError	ReadRing0(void *buf, PGPUInt64 pos, 
		PGPUInt32 nBytes) const;
	CComboError	ReadInt21Aux(void *buf, 
		PGPUInt32 nBytes) const;
	CComboError	ReadInt21(void *buf, PGPUInt64 pos, 
		PGPUInt32 nBytes) const;
	
	CComboError	WriteRing0(const void *buf, PGPUInt64 pos, 
		PGPUInt32 nBytes) const;
	CComboError	WriteInt21Aux(const void *buf, 
		PGPUInt32 nBytes) const;
	CComboError	WriteInt21(const void *buf, PGPUInt64 pos, 
		PGPUInt32 nBytes) const;
};

_PGP_END

#endif	// ] Included_CFileImpDrv98_h

⌨️ 快捷键说明

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