source: trunk/src/kernel32/hmmailslot.h@ 5655

Last change on this file since 5655 was 5587, checked in by sandervl, 24 years ago

added mailslot implemenation, named pipe fixes + FreeLibraryAndExitThread

File size: 4.1 KB
Line 
1/*
2 * Project Odin Software License can be found in LICENSE.TXT
3 * Win32 Unified Handle Manager for OS/2
4 */
5
6#ifndef __HMMAILSLOT_H__
7#define __HMMAILSLOT_H__
8
9
10/*****************************************************************************
11 * Remark *
12 *****************************************************************************
13 */
14
15
16/*****************************************************************************
17 * Includes *
18 *****************************************************************************/
19
20#include "HMDevice.h"
21#include "HMOpen32.h"
22
23
24#define MAILSLOT_SIZE 65536
25
26class HMMailSlotInfo
27{
28public:
29 HMMailSlotInfo(LPCSTR lpszName, HANDLE hPipe, DWORD nMaxMessageSize,
30 DWORD lReadTimeout, BOOL fServer,
31 LPSECURITY_ATTRIBUTES lpSecurityAttributes);
32 ~HMMailSlotInfo();
33
34 LPSTR lpszName;
35 LPSECURITY_ATTRIBUTES lpSecurityAttributes;
36 LPVOID lpMessage;
37 DWORD dwMessageCount;
38 DWORD nMaxMessageSize;
39 DWORD lReadTimeout;
40 BOOL fServer;
41 HANDLE hPipe;
42};
43
44/*****************************************************************************
45 * Structures *
46 *****************************************************************************/
47
48class HMMailslotClass : public HMDeviceHandler
49{
50public:
51 HMMailslotClass(LPCSTR lpDeviceName);
52
53 virtual BOOL FindDevice(LPCSTR lpClassDevName, LPCSTR lpDeviceName, int namelength);
54
55 BOOL CreateMailslotA(PHMHANDLEDATA pHMHandleData,
56 LPCSTR lpName, DWORD nMaxMessageSize,
57 DWORD lReadTimeout,
58 LPSECURITY_ATTRIBUTES lpSecurityAttributes);
59
60 virtual BOOL GetMailslotInfo(PHMHANDLEDATA pHMHandleData,
61 LPDWORD lpMaxMessageSize,
62 LPDWORD lpNextSize,
63 LPDWORD lpMessageCount,
64 LPDWORD lpReadTimeout);
65
66 virtual BOOL SetMailslotInfo(PHMHANDLEDATA pHMHandleData,
67 DWORD dwReadTimeout);
68
69
70 /* this is a handler method for calls to CreateFile() */
71 virtual DWORD CreateFile (LPCSTR lpFileName,
72 PHMHANDLEDATA pHMHandleData,
73 PVOID lpSecurityAttributes,
74 PHMHANDLEDATA pHMHandleDataTemplate);
75
76 /* this is a handler method for calls to CloseHandle() */
77 virtual BOOL CloseHandle(PHMHANDLEDATA pHMHandleData);
78
79
80 /* this is a handler method for calls to ReadFile() */
81 virtual BOOL ReadFile (PHMHANDLEDATA pHMHandleData,
82 LPCVOID lpBuffer,
83 DWORD nNumberOfBytesToRead,
84 LPDWORD lpNumberOfBytesRead,
85 LPOVERLAPPED lpOverlapped);
86
87 /* this is a handler method for calls to ReadFileEx() */
88 virtual BOOL ReadFileEx(PHMHANDLEDATA pHMHandleData,
89 LPVOID lpBuffer,
90 DWORD nNumberOfBytesToRead,
91 LPOVERLAPPED lpOverlapped,
92 LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
93
94 /* this is a handler method for calls to WriteFile() */
95 virtual BOOL WriteFile (PHMHANDLEDATA pHMHandleData,
96 LPCVOID lpBuffer,
97 DWORD nNumberOfBytesToWrite,
98 LPDWORD lpNumberOfBytesWritten,
99 LPOVERLAPPED lpOverlapped);
100
101 /* this is a handler method for calls to WriteFileEx() */
102 virtual BOOL WriteFileEx(PHMHANDLEDATA pHMHandleData,
103 LPVOID lpBuffer,
104 DWORD nNumberOfBytesToWrite,
105 LPOVERLAPPED lpOverlapped,
106 LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
107
108private:
109
110};
111
112
113#endif /* __HMMAILSLOT_H__ */
114
Note: See TracBrowser for help on using the repository browser.