1 /** 2 * Windows API header module 3 * 4 * Translated from MinGW Windows headers 5 * 6 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) 7 * Source: $(DRUNTIMESRC core/sys/windows/_httpext.d) 8 */ 9 /// Automatically imported and edited from the druntime module 10 /// core.sys.windows.httpext for the auto-generated win32 package. 11 module win32.httpext; 12 //version (Windows): 13 @system: 14 15 /* Comment from MinGW 16 httpext.h - Header for ISAPI extensions. 17 18 This file is part of a free library for the Win32 API. 19 20 This library is distributed in the hope that it will be useful, 21 but WITHOUT ANY WARRANTY; without even the implied warranty of 22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 23 */ 24 25 import win32.basetsd /+: DECLARE_HANDLE, HANDLE+/; 26 import win32.windef /+: BOOL, CHAR, DWORD, LPBYTE, LPDWORD+/; 27 import win32.winnt /+: LPCSTR, LPSTR, LPVOID, PVOID, VOID+/; 28 29 enum { 30 HSE_VERSION_MAJOR = 2, 31 HSE_VERSION_MINOR = 0, 32 HSE_LOG_BUFFER_LEN = 80, 33 HSE_MAX_EXT_DLL_NAME_LEN = 256, 34 HSE_STATUS_SUCCESS = 1, 35 HSE_STATUS_SUCCESS_AND_KEEP_CONN, 36 HSE_STATUS_PENDING, 37 HSE_STATUS_ERROR, 38 HSE_REQ_BASE = 0, 39 HSE_REQ_SEND_URL_REDIRECT_RESP, 40 HSE_REQ_SEND_URL, 41 HSE_REQ_SEND_RESPONSE_HEADER, 42 HSE_REQ_DONE_WITH_SESSION, 43 HSE_REQ_SEND_RESPONSE_HEADER_EX = 1016, 44 HSE_REQ_END_RESERVED = 1000, 45 HSE_TERM_ADVISORY_UNLOAD = 0x00000001, 46 HSE_TERM_MUST_UNLOAD, 47 HSE_IO_SYNC = 0x00000001, 48 HSE_IO_ASYNC, 49 HSE_IO_DISCONNECT_AFTER_SEND = 0x00000004, 50 HSE_IO_SEND_HEADERS = 0x00000008 51 } 52 53 mixin DECLARE_HANDLE!("HCONN"); 54 55 struct HSE_VERSION_INFO { 56 DWORD dwExtensionVersion; 57 CHAR[HSE_MAX_EXT_DLL_NAME_LEN] lpszExtensionDesc = 0; 58 } 59 alias HSE_VERSION_INFO* LPHSE_VERSION_INFO; 60 61 struct EXTENSION_CONTROL_BLOCK { 62 DWORD cbSize = EXTENSION_CONTROL_BLOCK.sizeof; 63 DWORD dwVersion; 64 HCONN ConnID; 65 DWORD dwHttpStatusCode; 66 CHAR[HSE_LOG_BUFFER_LEN] lpszLogData = 0; 67 LPSTR lpszMethod; 68 LPSTR lpszQueryString; 69 LPSTR lpszPathInfo; 70 LPSTR lpszPathTranslated; 71 DWORD cbTotalBytes; 72 DWORD cbAvailable; 73 LPBYTE lpbData; 74 LPSTR lpszContentType; 75 extern (Windows) { 76 BOOL function(HCONN, LPSTR, LPVOID, LPDWORD) GetServerVariable; 77 BOOL function(HCONN, LPVOID, LPDWORD, DWORD) WriteClient; 78 BOOL function(HCONN, LPVOID, LPDWORD) ReadClient; 79 BOOL function(HCONN, DWORD, LPVOID, LPDWORD, LPDWORD) ServerSupportFunction; 80 } 81 } 82 alias EXTENSION_CONTROL_BLOCK* LPEXTENSION_CONTROL_BLOCK; 83 84 extern (Windows) { 85 alias BOOL function(HSE_VERSION_INFO*) PFN_GETEXTENSIONVERSION; 86 alias DWORD function(EXTENSION_CONTROL_BLOCK*) PFN_HTTPEXTENSIONPROC; 87 alias BOOL function(DWORD) PFN_TERMINATEEXTENSION; 88 alias VOID function(EXTENSION_CONTROL_BLOCK*, PVOID, DWORD, DWORD) PFN_HSE_IO_COMPLETION; 89 } 90 91 struct HSE_TF_INFO { 92 PFN_HSE_IO_COMPLETION pfnHseIO; 93 PVOID pContext; 94 HANDLE hFile; 95 LPCSTR pszStatusCode; 96 DWORD BytesToWrite; 97 DWORD Offset; 98 PVOID pHead; 99 DWORD HeadLength; 100 PVOID pTail; 101 DWORD TailLength; 102 DWORD dwFlags; 103 } 104 alias HSE_TF_INFO* LPHSE_TF_INFO; 105 106 struct HSE_SEND_HEADER_EX_INFO { 107 LPCSTR pszStatus; 108 LPCSTR pszHeader; 109 DWORD cchStatus; 110 DWORD cchHeader; 111 BOOL fKeepConn; 112 } 113 alias HSE_SEND_HEADER_EX_INFO* LPHSE_SEND_HEADER_EX_INF; 114 115 extern (Windows) { 116 BOOL GetExtensionVersion(HSE_VERSION_INFO*); 117 DWORD HttpExtensionProc(EXTENSION_CONTROL_BLOCK*); 118 BOOL TerminateExtension(DWORD); 119 }