1 | /* $Id: hmdisk.h,v 1.7 2001-11-26 14:54:01 sandervl Exp $ */
|
---|
2 |
|
---|
3 | #ifndef __HMDISK_H__
|
---|
4 | #define __HMDISK_H__
|
---|
5 |
|
---|
6 | /*****************************************************************************
|
---|
7 | * Includes *
|
---|
8 | *****************************************************************************/
|
---|
9 |
|
---|
10 | #include <handlemanager.h>
|
---|
11 | #include "HMDevice.h"
|
---|
12 | #include "HMObjects.h"
|
---|
13 |
|
---|
14 | /*****************************************************************************
|
---|
15 | * Structures *
|
---|
16 | *****************************************************************************/
|
---|
17 |
|
---|
18 | class HMDeviceDiskClass : public HMDeviceKernelObjectClass
|
---|
19 | {
|
---|
20 | public:
|
---|
21 | HMDeviceDiskClass(LPCSTR lpDeviceName);
|
---|
22 |
|
---|
23 | //checks if device name belongs to this class
|
---|
24 | virtual BOOL FindDevice(LPCSTR lpClassDevName, LPCSTR lpDeviceName, int namelength);
|
---|
25 |
|
---|
26 | /* this is a handler method for calls to CreateFile() */
|
---|
27 | virtual DWORD CreateFile (HANDLE hHandle,
|
---|
28 | LPCSTR lpFileName,
|
---|
29 | PHMHANDLEDATA pHMHandleData,
|
---|
30 | PVOID lpSecurityAttributes,
|
---|
31 | PHMHANDLEDATA pHMHandleDataTemplate);
|
---|
32 |
|
---|
33 | virtual BOOL CloseHandle(PHMHANDLEDATA pHMHandleData);
|
---|
34 |
|
---|
35 | /* this is a handler method for calls to ReadFile() */
|
---|
36 | virtual BOOL ReadFile (PHMHANDLEDATA pHMHandleData,
|
---|
37 | LPCVOID lpBuffer,
|
---|
38 | DWORD nNumberOfBytesToRead,
|
---|
39 | LPDWORD lpNumberOfBytesRead,
|
---|
40 | LPOVERLAPPED lpOverlapped);
|
---|
41 |
|
---|
42 | /* this is a handler method for calls to SetFilePointer() */
|
---|
43 | virtual DWORD SetFilePointer(PHMHANDLEDATA pHMHandleData,
|
---|
44 | LONG lDistanceToMove,
|
---|
45 | PLONG lpDistanceToMoveHigh,
|
---|
46 | DWORD dwMoveMethod);
|
---|
47 |
|
---|
48 | /* this is a handler method for calls to DeviceIoControl() */
|
---|
49 | virtual BOOL DeviceIoControl (PHMHANDLEDATA pHMHandleData, DWORD dwIoControlCode,
|
---|
50 | LPVOID lpInBuffer, DWORD nInBufferSize,
|
---|
51 | LPVOID lpOutBuffer, DWORD nOutBufferSize,
|
---|
52 | LPDWORD lpBytesReturned, LPOVERLAPPED lpOverlapped);
|
---|
53 |
|
---|
54 | /* this is a handler method for calls to ReadFileEx() */
|
---|
55 | virtual BOOL ReadFileEx(PHMHANDLEDATA pHMHandleData,
|
---|
56 | LPVOID lpBuffer,
|
---|
57 | DWORD nNumberOfBytesToRead,
|
---|
58 | LPOVERLAPPED lpOverlapped,
|
---|
59 | LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
|
---|
60 |
|
---|
61 | /* this is a handler method for calls to WriteFile() */
|
---|
62 | virtual BOOL WriteFile (PHMHANDLEDATA pHMHandleData,
|
---|
63 | LPCVOID lpBuffer,
|
---|
64 | DWORD nNumberOfBytesToWrite,
|
---|
65 | LPDWORD lpNumberOfBytesWritten,
|
---|
66 | LPOVERLAPPED lpOverlapped);
|
---|
67 |
|
---|
68 | /* this is a handler method for calls to WriteFileEx() */
|
---|
69 | virtual BOOL WriteFileEx(PHMHANDLEDATA pHMHandleData,
|
---|
70 | LPVOID lpBuffer,
|
---|
71 | DWORD nNumberOfBytesToWrite,
|
---|
72 | LPOVERLAPPED lpOverlapped,
|
---|
73 | LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
|
---|
74 |
|
---|
75 | /* this is a handler method for calls to GetFileType() */
|
---|
76 | virtual DWORD GetFileType (PHMHANDLEDATA pHMHandleData);
|
---|
77 |
|
---|
78 | private:
|
---|
79 | DWORD OpenDisk(PVOID pDrvInfo);
|
---|
80 | };
|
---|
81 |
|
---|
82 |
|
---|
83 | #endif //__HMDISK_H__
|
---|