- sample.zip
- sample
- Sample
- ADO2XML
- ChangeServiceConfiguration
- ClockSync
- Counter
- Crypto
- CScript
- Data
- DeMangle
- DriverMover
- dump_ntfs_streams.cpp
- DumpEventLog
- EnableRASLogging
- EventPager
- GetWebPage
- HTML
- KillDoc
- LastEvent
- Listen
- ListProcesses
- MAKEMC.CMD
- Map2Def
- Microphone
- MIME2HTML
- PasswordFilter
- Ping
- Pinger
- RasAdmin
- Serial
- SerialTest
- Service
- SkyPage
- SprintSpectrum
- Squiggle
- TortureXML
- USNOTime
- WatchDog
- Wfc2Html
- WinPage
- XML
- XMLCheck
- XMLExplorer
- XMLUser
- TEST
- wfc.zip
- wfc
- html.zip
- HTML
|
#if ! defined( DUMMY_FILE_CLASS_HEADER )
/*
** Author: Samuel R. Blackburn
** Internet: wfc@pobox.com
**
** You can use it any way you like as long as you don't try to sell it.
**
** Any attempt to sell WFC in source code form must have the permission
** of the original author. You can produce commercial executables with
** WFC but you can't sell WFC.
**
** Copyright, 2000, Samuel R. Blackburn
**
** $Workfile: dumyfile.hpp $
** $Revision: 11 $
** $Modtime: 1/04/00 5:00a $
*/
#define DUMMY_FILE_CLASS_HEADER
class CDummyFile : public CFile
{
#if ! defined( WFC_NO_SERIALIZATION )
DECLARE_SERIAL( CDummyFile )
#endif // WFC_NO_SERIALIZATION
private:
// Don't allow canonical behavior (i.e. don't allow this class
// to be passed by value)
CDummyFile( const CDummyFile& ) {};
CDummyFile& operator=( const CDummyFile& ) { return( *this ); };
protected:
DWORD m_ErrorCode;
HANDLE m_TemplateHandle;
#if defined( WFC_STL )
HANDLE m_FileHandle;
#endif // WFC_STL
virtual DWORD m_CreateDesiredAccess( void ) const;
virtual DWORD m_CreateFlagsAndAttributes( void ) const;
virtual DWORD m_CreateShareMode( void ) const;
virtual LPSECURITY_ATTRIBUTES m_CreateSecurityAttributes( void ) const;
virtual DWORD m_CreateCreationDistribution( void ) const;
virtual HANDLE m_CreateTemplateHandle( void ) const;
public:
CDummyFile();
/*
** Destructor should be virtual according to MSJ article in Sept 1992
** "Do More with Less Code:..."
*/
virtual ~CDummyFile();
/*
** Interception functions (would blow up if we let CFile get them)
*/
virtual void Abort( void );
virtual void Close( void );
virtual void Flush( void );
virtual DWORD GetErrorCode( void ) const;
virtual DWORD GetLength( void ) const;
virtual DWORD GetPosition( void ) const;
#if ! defined( WFC_STL )
virtual BOOL GetStatus( CFileStatus& status );
virtual BOOL GetStatus( LPCTSTR name, CFileStatus& status );
#endif // WFC_STL
virtual void LockRange( DWORD position, DWORD count );
virtual void Remove( LPCTSTR name );
virtual void Rename( LPCTSTR OldName, LPCTSTR NewName );
virtual LONG Seek( LONG offset, UINT from );
#if ! defined( WFC_NO_SERIALIZATION )
virtual void Serialize( CArchive& archive );
#endif // WFC_NO_SERIALIZATION
virtual void SetLength( DWORD length );
#if ! defined( WFC_STL )
virtual void SetStatus( LPCTSTR name, const CFileStatus& status );
#endif // WFC_STL
virtual void UnlockRange( DWORD position, DWORD count );
/*
** A couple of utility functions to make life easier
*/
virtual void Write( const CString& string_to_write );
virtual void Write( const CByteArray& data_to_write );
// Abstraction Additions
inline HANDLE GetHandle( void ) const { return( (HANDLE) m_hFile ); }
inline void SetHandle( HANDLE file_handle ) { m_hFile = (UINT) file_handle; }
#if defined( _DEBUG ) && ! defined( WFC_NO_DUMPING )
virtual void Dump( CDumpContext& dump_context ) const;
#endif // _DEBUG
};
#endif // DUMMY_FILE_CLASS_HEADER
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
I'm just a simple little NT programmer. Most of the work I do is remote controlling equipment in real time. I started out using Windows 3.0. Then came 3.1 and then NT. I started using NT but unfortunately, Microsoft didn't. I started using MFC but unfortunately, Microsoft didn't (and
still doesn't) put any real support for NT into MFC so I wrote a bunch of C++ classes to make my life easier. Like all class libraries, mine grew. Now I'm giving it away, I call it Win32 Foundation Classes.
Check out Sam's homepage at
www.SamBlackburn.com/wfc/.