ReactOS 0.4.15-dev-7931-gfd331f1
httpd.cpp
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS HTTP Daemon
4 * FILE: httpd.cpp
5 * PURPOSE: HTTP daemon
6 * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net)
7 * REVISIONS:
8 * CSH 01/09/2000 Created
9 */
10#include <debug.h>
11#include <new>
12#include <malloc.h>
13#include <string.h>
14#include <config.h>
15#include <httpd.h>
16#include <error.h>
17
18using namespace std;
19
20CHAR HttpMsg400[] = "<HEAD><TITLE>400 Bad Request</TITLE></HEAD>\n\r<BODY><H1>400 Bad Request</H1>\n\rThe request had bad syntax.<BR>\n\r</BODY>\n\r\n\r";
21CHAR HttpMsg404[] = "<HEAD><TITLE>404 Not Found</TITLE></HEAD>\n\r<BODY><H1>404 Not Found</H1>\n\rThe requested URL was not found on this server.<BR>\n\r</BODY>\n\r\n\r";
22CHAR HttpMsg405[] = "<HEAD><TITLE>405 Method Not Allowed</TITLE></HEAD>\n\r<BODY><H1>405 Method Not Allowed</H1>\n\rThe requested method is not supported on this server.<BR>\n\r</BODY>\n\r\n\r";
23CHAR HttpMsg500[] = "<HEAD><TITLE>500 Internal Server Error</TITLE></HEAD>\n\r<BODY><H1>500 Internal Server Error</H1>\n\rAn internal error occurred.<BR>\n\r</BODY>\n\r\n\r";
24CHAR HttpMsg501[] = "<HEAD><TITLE>501 Not Implemented</TITLE></HEAD>\n\r<BODY><H1>501 Not Implemented</H1>\n\rThe feature is not implemented.<BR>\n\r</BODY>\n\r\n\r";
25
26
27// *************************** CHttpClient ***************************
28
29// Default constructor
31{
32}
33
34// Constructor with server socket as starter value
36{
37 ServerSocket = serversocket;
38}
39
40// Split URIs into its parts (ie. |http://|www.host.com|/resource|?parameters|)
41VOID CHttpClient::SplitUri(LPSTR lpsUri, LPSTR lpsHost, LPSTR lpsResource, LPSTR lpsParams)
42{
43 LPSTR lpsPos;
44 LPSTR lpsStr;
45 UINT i;
46
47 strcpy(lpsHost, "");
48 strcpy(lpsResource, "");
49 strcpy(lpsParams, "");
50
51 lpsPos = strstr(lpsUri, "://");
52 if (lpsPos != NULL)
53 lpsStr = &lpsPos[3];
54 else
55 lpsStr = lpsUri;
56
57 lpsPos = strstr(lpsStr, "/");
58 if (lpsPos != NULL) {
59 strncat(lpsHost, lpsPos, lpsPos - lpsStr);
60 lpsStr = &lpsPos[1];
61
62 lpsPos = strstr(lpsStr, "?");
63 if (lpsPos != NULL) {
64 strncat(lpsResource, lpsStr, lpsPos - lpsStr);
65 strcpy(lpsParams, &lpsPos[1]);
66 } else {
67 strcpy(lpsResource, lpsStr);
68 strcpy(lpsParams, "");
69 }
70
71 // Replace "/" with "\"
72 for (i = 0; i < strlen(lpsResource); i++) {
73 if (lpsResource[i] == '/')
74 lpsResource[i] = '\\';
75 }
76 }
77}
78
79// Split resource into its parts (ie. |/path/|filename|.extension|)
80VOID CHttpClient::SplitResource(LPSTR lpsResource, LPSTR lpsPath, LPSTR lpsFilename, LPSTR lpsExtension)
81{
82 INT i,len,fileptr,extptr;
83
84 strcpy(lpsPath, "");
85 strcpy(lpsFilename, "");
86 strcpy(lpsExtension, "");
87
88 len = strlen(lpsResource);
89 if (len != 0) {
90 if (lpsResource[len - 1] == '/') {
91 // There is only a path
92 strcpy(lpsPath, lpsResource);
93 } else {
94 // Find extension
95 i = len - 1;
96 while ((i >= 0) && (lpsResource[i] != '.')) i--;
97 extptr = i;
98 while ((i >= 0) && (lpsResource[i] != '/')) i--;
99 if (i > 0) {
100 // There is at least one directory in the path (besides root directory)
101 fileptr = i + 1;
102 strncat(lpsPath, lpsResource, fileptr);
103 } else
104 fileptr = 1;
105
106 // Get filename and possibly extension
107 if (extptr != 0) {
108 strncat(lpsFilename, &lpsResource[fileptr], extptr - fileptr);
109 // Get extension
110 strncat(lpsExtension, &lpsResource[extptr + 1], len - extptr - 1);
111 } else
112 strncat(lpsFilename, &lpsResource[fileptr], len - fileptr);
113 }
114 }
115}
116
117// Process HTTP request
119{
120 CHAR sStr[255];
121 CHAR sHost[255];
122 CHAR sResource[255];
123 CHAR sParams[255];
124
125 // Which method?
126 switch (Parser.nMethodNo) {
127 case hmGET: {
128 SplitUri(Parser.sUri, sHost, sResource, sParams);
129
130 // Default resource?
131 if (strlen(sResource) == 0) {
133
134 // FIXME: All default resources should be tried
135 // Iterate through all strings
136 //for (i->First(); !i->IsDone(); i->Next())
137 i->First();
138 if (!i->IsDone()) {
139 strcat(sResource, i->CurrentItem());
140 delete i;
141 } else {
142 // File not found
143 Report("404 Not Found", HttpMsg404);
144 break;
145 }
146 }
148 strcat(sStr, sResource);
149 SendFile(sStr);
150 break;
151 }
152 default: {
153 // Method is not implemented
154 Report("501 Not Implemented", HttpMsg501);
155 }
156 }
157}
158
159// Send a file to socket
161{
162 CHAR str[255];
163 CHAR str2[32];
164 union BigNum {
165 // unsigned __int64 Big;
166 unsigned long long Big;
167 struct {
168 DWORD Low;
169 DWORD High;
170 } u;
171 } nTotalBytes;
172 DWORD nBytesToRead;
173 DWORD nBytesRead;
174 BOOL bStatus;
175
176 // Try to open file
177 hFile = CreateFileA(lpsFilename,
178 GENERIC_READ, // Open for reading
179 FILE_SHARE_READ, // Share for reading
180 NULL, // No security
181 OPEN_EXISTING, // Existing file only
182 FILE_ATTRIBUTE_NORMAL, // Normal file
183 NULL); // No attr. template
185 // File not found
186 Report("404 Not Found", HttpMsg404);
187 return;
188 }
189 // Get file size
190 nTotalBytes.u.Low = GetFileSize(hFile, &nTotalBytes.u.High);
191 if ((nTotalBytes.u.Low == 0xFFFFFFFF) && ((GetLastError()) != NO_ERROR)) {
192 // Internal server error
193 Report("500 Internal Server Error", HttpMsg500);
194 // Close file
196 return;
197 }
198
199 // Determine buffer size
200 if (nTotalBytes.Big < 65536)
201 nBufferSize = 1024;
202 else
203 nBufferSize = 32768;
204 // Allocate memory on heap
206
207 if (lpsBuffer == NULL) {
208 // Internal server error
209 Report("500 Internal Server Error", HttpMsg500);
210 // Close file
212 return;
213 }
214
215 SendText("HTTP/1.1 200 OK");
216 SendText("Server: ROSHTTPD");
217 SendText("MIME-version: 1.0");
218 SendText("Content-Type: text/plain");
219 SendText("Accept-Ranges: bytes");
220 strcpy(str, "Content-Length: ");
221 _itoa(nTotalBytes.u.Low, str2, 10);
222 strcat(str, str2);
223 SendText(str);
224 SendText("");
225 // Read and transmit file
226 nTotalRead = 0;
227 nFileSize = nTotalBytes.Big;
228 bStop = FALSE;
229
230 fd_set wfds;
231 FD_ZERO(&wfds);
232 FD_SET(Socket, &wfds);
233 do {
234 MessageLoop();
235
237 nBytesToRead = nBufferSize;
238 else nBytesToRead = nFileSize - nTotalRead;
239
240 bStatus = ReadFile(hFile, lpsBuffer, nBytesToRead, &nBytesRead, NULL);
241 if (bStatus) {
242 select(0, NULL, &wfds, NULL, NULL);
243 bStatus = (Transmit(lpsBuffer, nBytesRead) == (INT)nBytesRead);
244 nTotalRead += nBytesRead;
245 }
246 } while ((!bStop) && (bStatus) && (nTotalRead < nFileSize));
247
248 if (bStatus)
249 SendText("");
250 else
251 // We can't send an error message here as we are in the process of sending a file.
252 // We have to terminate the connection instead
253 Close();
254
255 // Free allocated memory
257
258 // Close file
260}
261
262// Report something to client
264{
265 CHAR sTmp[128];
266 CHAR sTmp2[16];
267
268 strcpy(sTmp, "HTTP/1.1 ");
269 strcat(sTmp, lpsCode);
270 SendText(sTmp);
271 SendText("Server: ROSHTTPD");
272 SendText("MIME-version: 1.0");
273 SendText("Content-Type: text/html");
274 SendText("Accept-Ranges: bytes");
275 strcpy(sTmp, "Content-Length: ");
276 if (lpsStr != NULL) {
277 _itoa(strlen(lpsStr), sTmp2, 10);
278 strcat(sTmp, sTmp2);
279 } else
280 strcat(sTmp, "0");
281 SendText(sTmp);
282 SendText("");
283 if (lpsStr != NULL)
284 SendText(lpsStr);
285 SendText("");
286}
287
288// OnRead event handler
290{
291 LONG nCount;
292
293 nCount = Receive((LPSTR) &Parser.sBuffer[Parser.nHead],
294 sizeof(Parser.sBuffer) - Parser.nHead);
295
296 Parser.nHead += nCount;
297 if (Parser.nHead >= sizeof(Parser.sBuffer))
298 Parser.nHead = 0;
299
300 if (Parser.Complete()) {
302 }
303
305 // Method Not Allowed
306 Report("405 Method Not Allowed", HttpMsg405);
307 // Terminate connection
308 Close();
309 }
310}
311/*
312// OnWrite event handler
313VOID CHttpClient::OnWrite()
314{
315 DWORD nBytesToRead;
316 DWORD nBytesRead;
317
318 OutputDebugString(TS("Can write\n"));
319
320 if (bSendingFile) {
321 if (nTotalRead + nBufferSize < nFileSize)
322 nBytesToRead = nBufferSize;
323 else nBytesToRead = nFileSize - nTotalRead;
324
325 bError = ReadFile(hFile, Buffer, nBytesToRead, &nBytesRead, NULL);
326 if (!bError) {
327 Transmit(Buffer, nBytesRead);
328 nTotalRead += nBytesRead;
329 }
330 }
331}
332*/
333// OnClose event handler
335{
336 // Stop sending file if we are doing that now
337 bStop = TRUE;
338}
339
340
341// ************************ CHttpClientThread ************************
342
343// Constructor with client socket as starter value
345{
346 ClientSocket = lpSocket;
347}
348
349// Execute client thread code
351{
352 MSG Msg;
353
354 while (!Terminated()) {
355 (( CHttpClient *) ClientSocket)->MessageLoop();
356 if (PeekMessage(&Msg, 0, 0, 0, PM_REMOVE) != 0) {
357 switch (Msg.message) {
358 case HTTPD_START: {
359 // TODO: Start thread
360 break;
361 }
362 case HTTPD_STOP: {
363 // TODO: Stop thread
364 break;
365 }
366 default:
368 }
369
370 }
371 }
372
373 if (ClientSocket != NULL) {
374 delete ClientSocket;
376 }
377}
378
379
380// *************************** CHttpDaemon ***************************
381
382// Default constructor
384{
386 Start();
387}
388
389// Default destructor
391{
392 if (State==hsRunning)
393 Stop();
394}
395
396// Return daemon state
398{
399 return State;
400}
401
402// Start HTTP daemon
404{
406
408
409 Open();
410
412
413 return TRUE;
414}
415
416// Stop HTTP daemon
418{
420
421 Close();
422
424
425 return TRUE;
426}
427
428// OnGetSocket event handler
430{
431 return new CHttpClient(lpServerSocket);
432}
433
434// OnGetThread event handler
436{
437 return new CHttpClientThread(lpSocket);
438}
439
440// OnAccept event handler
442{
443}
444
445
446// ************************ CHttpDaemonThread ************************
447
448// Execute daemon thread code
450{
451 MSG Msg;
452
453 try {
454 Daemon = NULL;
455 Daemon = new CHttpDaemon;
456
457 while (!Terminated()) {
459 if (PeekMessage(&Msg, 0, 0, 0, PM_REMOVE) != 0) {
460 switch (Msg.message) {
461 case HTTPD_START: {
462 if (Daemon->GetState() == hsStopped)
463 Daemon->Start();
464 break;
465 }
466 case HTTPD_STOP: {
467 if (Daemon->GetState() == hsRunning)
468 Daemon->Stop();
469 break;
470 }
471 case HTTPD_SUSPEND: {
472 if (Daemon->GetState() == hsRunning){}
473 // FIXME: Suspend service
474 break;
475 }
476 case HTTPD_RESUME: {
477 if (Daemon->GetState() != hsSuspended){}
478 // FIXME: Resume service
479 break;
480 }
481 default:
483 }
484 }
485 }
486 delete Daemon;
487 } catch (ESocket e) {
488 ReportErrorStr(e.what());
489 } catch (bad_alloc&) {
490 ReportErrorStr(TS("Insufficient resources."));
491 }
492}
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
char * strstr(char *String1, char *String2)
Definition: utclib.c:653
char * strncat(char *DstString, const char *SrcString, ACPI_SIZE Count)
Definition: utclib.c:605
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
LPSTR GetHttpBase()
Definition: config.cpp:104
USHORT GetPort()
Definition: config.cpp:122
CList< LPSTR > * GetDefaultResources()
Definition: config.cpp:116
CHttpClientThread()
Definition: httpd.h:55
virtual void Execute()
Definition: httpd.cpp:350
virtual void OnClose()
Definition: httpd.cpp:334
unsigned long long nTotalRead
Definition: httpd.h:46
void ProcessRequest()
Definition: httpd.cpp:118
void SplitUri(const LPSTR lpsUri, LPSTR lpsHost, LPSTR lpsResource, LPSTR lpsParams)
Definition: httpd.cpp:41
unsigned long long nFileSize
Definition: httpd.h:48
void SplitResource(const LPSTR lpsResource, LPSTR lpsPath, LPSTR lpsFilename, LPSTR lpsExtension)
Definition: httpd.cpp:80
CHttpClient()
Definition: httpd.cpp:30
virtual void OnRead()
Definition: httpd.cpp:289
LPSTR lpsBuffer
Definition: httpd.h:43
BOOL bStop
Definition: httpd.h:42
LONG nBufferSize
Definition: httpd.h:44
CHttpParser Parser
Definition: httpd.h:35
void Report(LPCSTR lpsCode, const LPSTR lpsStr)
Definition: httpd.cpp:263
void SendFile(const LPSTR lpsFilename)
Definition: httpd.cpp:160
CHttpDaemon * Daemon
Definition: httpd.h:81
virtual void Execute()
Definition: httpd.cpp:449
virtual BOOL Stop()
Definition: httpd.cpp:417
virtual BOOL Start()
Definition: httpd.cpp:403
HTTPdState State
Definition: httpd.h:72
CHttpDaemon()
Definition: httpd.cpp:383
virtual ~CHttpDaemon()
Definition: httpd.cpp:390
virtual LPCServerClientSocket OnGetSocket(LPCServerSocket lpServerSocket)
Definition: httpd.cpp:429
virtual LPCServerClientThread OnGetThread(LPCServerClientSocket Socket)
Definition: httpd.cpp:435
HTTPdState GetState() const
Definition: httpd.cpp:397
virtual void OnAccept(LPCServerClientThread lpThread)
Definition: httpd.cpp:441
CHAR sBuffer[2048]
Definition: http.h:28
UINT nHead
Definition: http.h:29
CHAR sUri[255]
Definition: http.h:31
UINT nMethodNo
Definition: http.h:35
BOOL Complete()
Definition: http.cpp:49
BOOL bUnknownMethod
Definition: http.h:36
CIterator< Item > * CreateIterator() const
Definition: list.h:93
virtual INT Receive(LPSTR lpsBuffer, UINT nLength)
Definition: socket.cpp:126
LPCServerSocket ServerSocket
Definition: socket.h:111
virtual INT Transmit(LPCSTR lpsBuffer, UINT nLength)
Definition: socket.cpp:109
virtual INT SendText(LPCSTR lpsText)
Definition: socket.cpp:115
virtual VOID MessageLoop()
Definition: socket.cpp:132
CServerClientSocket * ClientSocket
Definition: socket.h:120
virtual VOID Open()
Definition: socket.cpp:183
virtual VOID MessageLoop()
Definition: socket.cpp:251
virtual VOID Close()
Definition: socket.cpp:212
SOCKET Socket
Definition: socket.h:89
virtual VOID Close()
Definition: socket.cpp:95
BOOL Terminated()
Definition: thread.cpp:77
Definition: socket.h:32
struct @1632 Msg[]
LPCConfig pConfiguration
Definition: config.cpp:18
#define NO_ERROR
Definition: dderror.h:5
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define CloseHandle
Definition: compat.h:739
#define OPEN_EXISTING
Definition: compat.h:775
#define ReadFile(a, b, c, d, e)
Definition: compat.h:742
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define CreateFileA(a, b, c, d, e, f, g)
Definition: compat.h:740
#define GENERIC_READ
Definition: compat.h:135
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:137
#define FILE_SHARE_READ
Definition: compat.h:136
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
Definition: fileinfo.c:331
INT WSAAPI select(IN INT s, IN OUT LPFD_SET readfds, IN OUT LPFD_SET writefds, IN OUT LPFD_SET exceptfds, IN CONST struct timeval *timeout)
Definition: select.c:41
#define assert(x)
Definition: debug.h:53
void ReportErrorStr(LPTSTR lpsText)
Definition: error.cpp:13
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum GLsizei len
Definition: glext.h:6722
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
CHAR HttpMsg400[]
Definition: httpd.cpp:20
CHAR HttpMsg500[]
Definition: httpd.cpp:23
CHAR HttpMsg501[]
Definition: httpd.cpp:24
CHAR HttpMsg405[]
Definition: httpd.cpp:22
CHAR HttpMsg404[]
Definition: httpd.cpp:21
#define HTTPD_SUSPEND
Definition: httpd.h:15
#define HTTPD_STOP
Definition: httpd.h:14
HTTPdState
Definition: httpd.h:18
@ hsRunning
Definition: httpd.h:20
@ hsStopped
Definition: httpd.h:19
@ hsSuspended
Definition: httpd.h:21
#define HTTPD_START
Definition: httpd.h:13
#define HTTPD_RESUME
Definition: httpd.h:16
_CRTIMP char *__cdecl _itoa(_In_ int _Value, _Pre_notnull_ _Post_z_ char *_Dest, _In_ int _Radix)
#define e
Definition: ke_i.h:82
#define PCHAR
Definition: match.c:90
#define TS(x)
Definition: error.h:11
#define hmGET
Definition: http.h:19
_In_ HANDLE hFile
Definition: mswsock.h:90
Definition: features.h:417
unsigned int UINT
Definition: ndis.h:50
long LONG
Definition: pedump.c:60
#define INT
Definition: polytest.cpp:20
const WCHAR * str
@ High
Definition: strmini.h:378
@ Low
Definition: strmini.h:380
Definition: winsock.h:66
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
int32_t INT
Definition: typedefs.h:58
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define FD_ZERO(set)
Definition: winsock.h:96
#define FD_SET(fd, set)
Definition: winsock.h:89
#define SetPort
Definition: winspool.h:1247
#define PM_REMOVE
Definition: winuser.h:1196
#define PeekMessage
Definition: winuser.h:5830
#define DispatchMessage
Definition: winuser.h:5765
const char * LPCSTR
Definition: xmlstorage.h:183
char * LPSTR
Definition: xmlstorage.h:182
char CHAR
Definition: xmlstorage.h:175