cfilesystemwatcher.h

来自「PGP8.0源码 请认真阅读您的文件包然后写出其具体功能」· C头文件 代码 · 共 63 行

H
63
字号
/*____________________________________________________________________________
		Copyright (C) 2002 PGP Corporation
        All rights reserved.

        $Id: CFilesystemWatcher.h,v 1.2 2002/08/06 20:09:30 dallen Exp $
____________________________________________________________________________*/

#ifndef Included_CFilesystemWatcher_h	// [
#define Included_CFilesystemWatcher_h

#include "CList.h"
#include "CLookasideList.h"
#include "CSpinLock.h"
#include "CSubsystem.h"

_PGP_BEGIN

// Class CFilesystemWatcher

// CFilesystemWatcher is a companion to CFileImpDrv98 for PGPdisk. To make
// a long story short:
// 
// When opened with 'FileVirtualVolumeFlag', CFileImp98 specified 0x81 as
// the flags, which means R0_NO_CACHE | R0_MM_READ_WRITE. However, under
// Win98, these flags are cleared within every request on the file, and we
// have to hook into the filesystem to restore them whenever one of 'our'
// requests is seen.

class CFilesystemWatcher : public CSubsystem
{
	friend class CDriverSubsystemsDrv98;

private:
	struct WatchedBufInfo;

private:
	CFilesystemWatcher();

public:
	CComboError	WatchForBuffer(void *buf);
	CComboError	StopWatchingForBuffer(void *buf);

private:
	CLookasideList<WatchedBufInfo>	mWBIAllocator;
	CList<WatchedBufInfo>			mWBIList;

	ppIFSFileHookFunc			mPreviousHook;
	static CFilesystemWatcher	*mHookInstance;

	CComboError	Startup();
	void		Shutdown();

	int	FilesystemHookAux(pIFSFunc pfn, int func, int drive, int resType, 
		int codePage, pioreq pir);

	static int _cdecl	FilesystemHook(pIFSFunc pfn, int func, int drive, 
		int resType, int codePage, pioreq pir);
};

_PGP_END

#endif	// Included_CFilesystemWatcher_h

⌨️ 快捷键说明

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