BazisLib::DDK::BasicCDVolume Class Reference

#include <cdrom.h>

Inherits BazisLib::DDK::BasicStorageVolume.

Collaboration diagram for BazisLib::DDK::BasicCDVolume:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 BasicCDVolume (LPCWSTR pwszDevicePrefix=L"BazisCD", bool bDeleteThisAfterRemoveRequest=false, ULONG DeviceType=FILE_DEVICE_CD_ROM, ULONG DeviceCharacteristics=FILE_DEVICE_SECURE_OPEN, bool bExclusive=FALSE, ULONG AdditionalDeviceFlags=DO_POWER_PAGABLE)
 ~BasicCDVolume ()

Protected Types

enum  { CD_SECTOR_SIZE = 2048 }

Protected Member Functions

void BuildCDTrackAddress (unsigned SectorNumber, unsigned char *pAddr)
void InitializeTrackRecord (_TRACK_DATA *pTrack, unsigned TrackNumber, unsigned SectorNumber)
void InitializeTOCHeader (_CDROM_TOC *pTOC, unsigned TrackCount)
virtual unsigned GetSectorSize ()
virtual NTSTATUS OnEject ()
virtual NTSTATUS OnReadTOC (struct _CDROM_TOC *pTOC)
virtual NTSTATUS OnGetLastSession (struct _CDROM_TOC_SESSION_DATA *pSession)
virtual NTSTATUS OnDeviceControl (ULONG ControlCode, bool IsInternal, void *pInOutBuffer, ULONG InputLength, ULONG OutputLength, PULONG pBytesDone) override

Private Attributes

unsigned m_SectorSize
ULONGLONG m_SectorCount
ULONGLONG m_SizeInBytes
DEVICE_TYPE m_ReportedDeviceType


Detailed Description

This class provides a very easy way to maintain a CD volume recognizable by Windows Device Manager. Please do not override methods other than listed after "Overridables" comment to avoid incompatibility with future versions.

If you requre any additional functionality, please create another universal library class providing that functionality and having the corresponding abstract methods, and contact me via SourceForge.net

For basic overview of various CD formats and concepts, see cd_basics this page


Member Enumeration Documentation

anonymous enum [protected]

Enumerator:
CD_SECTOR_SIZE 


Constructor & Destructor Documentation

BazisLib::DDK::BasicCDVolume::BasicCDVolume ( LPCWSTR  pwszDevicePrefix = L"BazisCD",
bool  bDeleteThisAfterRemoveRequest = false,
ULONG  DeviceType = FILE_DEVICE_CD_ROM,
ULONG  DeviceCharacteristics = FILE_DEVICE_SECURE_OPEN,
bool  bExclusive = FALSE,
ULONG  AdditionalDeviceFlags = DO_POWER_PAGABLE 
)

BazisLib::DDK::BasicCDVolume::~BasicCDVolume (  ) 


Member Function Documentation

void BazisLib::DDK::BasicCDVolume::BuildCDTrackAddress ( unsigned  SectorNumber,
unsigned char *  pAddr 
) [protected]

virtual unsigned BazisLib::DDK::BasicCDVolume::GetSectorSize (  )  [inline, protected, virtual]

Reimplemented from BazisLib::DDK::BasicStorageVolume.

void BazisLib::DDK::BasicCDVolume::InitializeTOCHeader ( _CDROM_TOC *  pTOC,
unsigned  TrackCount 
) [protected]

void BazisLib::DDK::BasicCDVolume::InitializeTrackRecord ( _TRACK_DATA *  pTrack,
unsigned  TrackNumber,
unsigned  SectorNumber 
) [protected]

virtual NTSTATUS BazisLib::DDK::BasicCDVolume::OnDeviceControl ( ULONG  ControlCode,
bool  IsInternal,
void *  pInOutBuffer,
ULONG  InputLength,
ULONG  OutputLength,
PULONG  pBytesDone 
) [override, protected, virtual]

This method is called when the driver receives an IRP_MJ_DEVICE_CONTROL or IRP_MJ_INTERNAL_DEVICE_CONTROL packet with Transfer Type bits set to METHOD_BUFFERED

Reimplemented from BazisLib::DDK::StorageDevice.

virtual NTSTATUS BazisLib::DDK::BasicCDVolume::OnEject (  )  [protected, virtual]

virtual NTSTATUS BazisLib::DDK::BasicCDVolume::OnGetLastSession ( struct _CDROM_TOC_SESSION_DATA *  pSession  )  [protected, virtual]

virtual NTSTATUS BazisLib::DDK::BasicCDVolume::OnReadTOC ( struct _CDROM_TOC *  pTOC  )  [protected, virtual]


Member Data Documentation

Reimplemented from BazisLib::DDK::BasicStorageVolume.

Reimplemented from BazisLib::DDK::BasicStorageVolume.

Reimplemented from BazisLib::DDK::BasicStorageVolume.

Reimplemented from BazisLib::DDK::BasicStorageVolume.


The documentation for this class was generated from the following file:
SourceForge.net Logo