Download Source Code

CPFile Class Reference

Extends the CPipe class adding disk file functionality. More...

#include <PFile.h>

Inheritance diagram for CPFile:

Inheritance graph
[legend]
Collaboration diagram for CPFile:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CPFile (LPCTSTR pFile, DWORD access, BOOL bNew)
 Constructs the object and initializes the file interface.
 CPFile (LPCTSTR pFile, LPCTSTR pKey, DWORD access, BOOL bNew)
 Constructs the object and initializes the file interface.
 CPFile ()
 Default constructor.
virtual ~CPFile ()
 Destructor.
virtual BOOL ProcessWrite (LPVOID buf, DWORD size, LPDWORD written)
 Called when data is written to the pipe.
virtual BOOL ProcessRead (LPVOID buf, DWORD size, LPDWORD read)
 Called when data is read from the pipe.
CWinFileFile ()
 Returns the encapsulated CWinFile object.

Detailed Description

Extends the CPipe class adding disk file functionality.

Extends the CPipe class to support disk access. You can use this whenever a pipe is required, and the output will be directed to a disk file instead of memory.


Constructor & Destructor Documentation

CPFile::CPFile LPCTSTR  pFile,
DWORD  access,
BOOL  bNew
 

Constructs the object and initializes the file interface.

Parameters:
[in] pFile - Filename
[in] access - File access flags
[in] bNew - Non-zero to truncate existing file

CPFile::CPFile LPCTSTR  pFile,
LPCTSTR  pKey,
DWORD  access,
BOOL  bNew
 

Constructs the object and initializes the file interface.

Parameters:
[in] pFile - Filename
[in] pKey - Encryption key
[in] access - File access flags
[in] bNew - Non-zero to truncate existing file
Returns:
See also:


Member Function Documentation

CWinFile& CPFile::File  )  [inline]
 

Returns the encapsulated CWinFile object.

Returns:
Pointer to encapsulated CWinFile object.
See also:

BOOL CPFile::ProcessRead LPVOID  buf,
DWORD  size,
LPDWORD  read
[virtual]
 

Called when data is read from the pipe.

Parameters:
[out] buf - Buffer that receives read data
[in] size - Size of buffer in buf
[out] read - Number of bytes read into buf
Returns:
Non-zero if success
See also:

Reimplemented from CPipe.

BOOL CPFile::ProcessWrite LPVOID  buf,
DWORD  size,
LPDWORD  written
[virtual]
 

Called when data is written to the pipe.

Parameters:
[in] buf - Buffer containing write data
[in] size - Number of bytes in buf
[out] written - Number of bytes written
Returns:
Non-zero if success
See also:

Reimplemented from CPipe.


The documentation for this class was generated from the following files:
  • inc/PFile.h
  • PFile.cpp
Copyright Robert Umbehant
This documentation is covered by the LGPL