Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
FILESYSTEM.CPP
Upload User: linklycbj
Upload Date: 2009-11-12
Package Size: 447k
Code Size: 3k
Category:
Windows Develop
Development Platform:
WINDOWS
- // FileSystem.cpp -- Implementation of CFileSystem
- // Copyright (C) 1996 by Walter Oney
- // All rights reserved
- #define NULL 0
- class CFileSystem;
- #define rh_t CFileSystem*
- extern "C" {
- #define WANTVXDWRAPS
- #include <basedef.h>
- #include <vmm.h>
- #include <debug.h>
- #include <vxdwraps.h>
- #include <winerror.h>
- #include "iosdcls.h"
- #include "ifsmgr.h"
- } // extern "C"
- #pragma hdrstop
- #include "FileSystem.h"
- ///////////////////////////////////////////////////////////////////////////////
- CFileSystem* (*CFileSystem::CreateNewFcn)() = NULL;
- int CFileSystem::ProviderId = 0;
- CFileSystem::CFileSystem()
- { // CFileSystem::CFileSystem
- } // CFileSystem::CFileSystem
- CFileSystem::~CFileSystem()
- { // CFileSystem::~CFileSystem
- } // CFileSystem::~CFileSystem
- BOOL CFileSystem::Register(CFileSystem* (*createnew)())
- { // CFileSystem::Register
- CreateNewFcn = createnew;
- return TRUE;
- } // CFileSystem::Register
- ///////////////////////////////////////////////////////////////////////////////
- #undef vt
- #define vt(f) int CFileSystem::f##Thunk(pioreq pir) {return pir->ir_error = ((CFileSystem*)(pir->ir_rh))->f(pir);}
- vt(EmptyFunc)
- vt(DeleteFile)
- vt(Dir)
- vt(FileAttributes)
- vt(FlushVolume)
- vt(GetDiskInfo)
- vt(OpenFile)
- vt(RenameFile)
- vt(SearchFile)
- vt(QueryResourceInfo)
- vt(DisconnectResource)
- vt(NamedPipeUNCRequest)
- vt(Ioctl16Drive)
- vt(GetDiskParms)
- vt(FindFirstFile)
- vt(DirectDiskIO)
- vt(FindClose)
- vt(FindNextFile)
- vt(ReadFile)
- vt(WriteFile)
- vt(FileSeek)
- vt(CloseFile)
- vt(CommitFile)
- vt(LockFile)
- vt(FileDateTime)
- vt(NamedPipeHandleInfo)
- vt(EnumerateHandle)
- // Default implementations of FSD functions that should be overridden:
- #undef vt
- #define vt(f) int CFileSystem::f(pioreq pir) {
- ASSERT(!"Using base-class " #f);
- return pir->ir_error = ERROR_INVALID_FUNCTION;}
- vt(DeleteFile)
- vt(Dir)
- vt(FileAttributes)
- vt(FlushVolume)
- vt(GetDiskInfo)
- vt(OpenFile)
- vt(RenameFile)
- vt(SearchFile)
- vt(QueryResourceInfo)
- vt(NamedPipeUNCRequest)
- vt(Ioctl16Drive)
- vt(GetDiskParms)
- vt(FindFirstFile)
- vt(DirectDiskIO)
- vt(FindClose)
- vt(FindNextFile)
- vt(ReadFile)
- vt(WriteFile)
- vt(FileSeek)
- vt(CloseFile)
- vt(CommitFile)
- vt(LockFile)
- vt(FileDateTime)
- vt(NamedPipeHandleInfo)
- vt(EnumerateHandle)
- // An instance that wants to supply an empty function should point to
- // EmptyFunc, which doesn't ASSERT when called:
- int CFileSystem::EmptyFunc(pioreq pir)
- { // CFileSystem::EmptyFunc
- return pir->ir_error = ERROR_INVALID_FUNCTION;
- } // CFileSystem::EmptyFunc
- ///////////////////////////////////////////////////////////////////////////////
- int CFileSystem::DisconnectResource(pioreq pir)
- { // CLocalFileSystem::DisconnectResource
- delete this;
- return pir->ir_error = 0;
- } // CLocalFileSystem::DisconnectResource
- ///////////////////////////////////////////////////////////////////////////////