1 | /* $Id: hmnul.h,v 1.1 2001-11-29 00:20:48 phaller Exp $ */
|
---|
2 |
|
---|
3 | /*
|
---|
4 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
5 | *
|
---|
6 | * Win32 NUL device access class
|
---|
7 | *
|
---|
8 | * 2001 Patrick Haller <patrick.haller@innotek.de>
|
---|
9 | *
|
---|
10 | */
|
---|
11 |
|
---|
12 | #ifndef _HM_NUL_H_
|
---|
13 | #define _HM_NUL_H_
|
---|
14 |
|
---|
15 | class HMDeviceNulClass : public HMDeviceHandler
|
---|
16 | {
|
---|
17 | public:
|
---|
18 |
|
---|
19 | HMDeviceNulClass(LPCSTR lpDeviceName);
|
---|
20 |
|
---|
21 | //checks if device name belongs to this class
|
---|
22 | virtual BOOL FindDevice(LPCSTR lpClassDevName, LPCSTR lpDeviceName, int namelength);
|
---|
23 |
|
---|
24 | /* this is the handler method for calls to CreateFile() */
|
---|
25 | virtual DWORD CreateFile (HANDLE hHandle,
|
---|
26 | LPCSTR lpFileName,
|
---|
27 | PHMHANDLEDATA pHMHandleData,
|
---|
28 | PVOID lpSecurityAttributes,
|
---|
29 | PHMHANDLEDATA pHMHandleDataTemplate);
|
---|
30 |
|
---|
31 | /* this is the handler method for calls to CloseHandle() */
|
---|
32 | virtual BOOL CloseHandle(PHMHANDLEDATA pHMHandleData);
|
---|
33 |
|
---|
34 | /* this is a handler method for calls to DeviceIoControl() */
|
---|
35 | virtual BOOL DeviceIoControl (PHMHANDLEDATA pHMHandleData, DWORD dwIoControlCode,
|
---|
36 | LPVOID lpInBuffer, DWORD nInBufferSize,
|
---|
37 | LPVOID lpOutBuffer, DWORD nOutBufferSize,
|
---|
38 | LPDWORD lpBytesReturned, LPOVERLAPPED lpOverlapped);
|
---|
39 |
|
---|
40 |
|
---|
41 | /* this is a handler method for calls to ReadFile() */
|
---|
42 | virtual BOOL ReadFile (PHMHANDLEDATA pHMHandleData,
|
---|
43 | LPCVOID lpBuffer,
|
---|
44 | DWORD nNumberOfBytesToRead,
|
---|
45 | LPDWORD lpNumberOfBytesRead,
|
---|
46 | LPOVERLAPPED lpOverlapped);
|
---|
47 |
|
---|
48 | /* this is a handler method for calls to ReadFileEx() */
|
---|
49 | virtual BOOL ReadFileEx(PHMHANDLEDATA pHMHandleData,
|
---|
50 | LPVOID lpBuffer,
|
---|
51 | DWORD nNumberOfBytesToRead,
|
---|
52 | LPOVERLAPPED lpOverlapped,
|
---|
53 | LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
|
---|
54 |
|
---|
55 | /* this is a handler method for calls to WriteFile() */
|
---|
56 | virtual BOOL WriteFile (PHMHANDLEDATA pHMHandleData,
|
---|
57 | LPCVOID lpBuffer,
|
---|
58 | DWORD nNumberOfBytesToWrite,
|
---|
59 | LPDWORD lpNumberOfBytesWritten,
|
---|
60 | LPOVERLAPPED lpOverlapped);
|
---|
61 |
|
---|
62 | /* this is a handler method for calls to WriteFileEx() */
|
---|
63 | virtual BOOL WriteFileEx(PHMHANDLEDATA pHMHandleData,
|
---|
64 | LPVOID lpBuffer,
|
---|
65 | DWORD nNumberOfBytesToWrite,
|
---|
66 | LPOVERLAPPED lpOverlapped,
|
---|
67 | LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
|
---|
68 |
|
---|
69 | private:
|
---|
70 | };
|
---|
71 |
|
---|
72 |
|
---|
73 | #endif // _HM_NUL_H_
|
---|