home *** CD-ROM | disk | FTP | other *** search
/ Supercompiler 1997 / SUPERCOMPILER97.iso / MS_VC.50 / VC / MFC / INCLUDE / AFXISAPI.H < prev    next >
Encoding:
C/C++ Source or Header  |  1996-12-13  |  18.5 KB  |  592 lines

  1. // This is a part of the Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1992-1997 Microsoft Corporation
  3. // All rights reserved.
  4.  
  5. // This source code is only intended as a supplement to the
  6. // Microsoft Foundation Classes Reference and related
  7. // electronic documentation provided with the library.
  8. // See these sources for detailed information regarding the
  9. // Microsoft Foundation Classes product.
  10.  
  11. #ifndef __AFXISAPI_H_
  12. #define __AFXISAPI_H_
  13.  
  14. #ifdef _UNICODE
  15. #error ERROR: ISAPI does not yet support Unicode.
  16. #endif
  17.  
  18. /////////////////////////////////////////////////////////////////////////////
  19. // Turn off warnings for /W4
  20. // To resume any of these warning: #pragma warning(default: 4xxx)
  21. // which should be placed after the AFX include files
  22. #ifndef ALL_WARNINGS
  23. // warnings generated with common MFC/Windows code
  24. #pragma warning(disable: 4127)  // constant expression for TRACE/ASSERT
  25. #pragma warning(disable: 4134)  // message map member fxn casts
  26. #pragma warning(disable: 4201)  // nameless unions are part of C++
  27. #pragma warning(disable: 4511)  // private copy constructors are good to have
  28. #pragma warning(disable: 4512)  // private operator= are good to have
  29. #pragma warning(disable: 4514)  // unreferenced inlines are common
  30. #pragma warning(disable: 4710)  // private constructors are disallowed
  31. #pragma warning(disable: 4705)  // statement has no effect in optimized code
  32. // warnings caused by normal optimizations
  33. #ifndef _DEBUG
  34. #pragma warning(disable: 4701)  // local variable *may* be used without init
  35. #pragma warning(disable: 4702)  // unreachable code caused by optimizations
  36. #pragma warning(disable: 4791)  // loss of debugging info in retail version
  37. #endif
  38. // warnings specific to _AFXDLL version
  39. #ifdef _AFXDLL
  40. #pragma warning(disable: 4204)  // non-constant aggregate initializer
  41. #endif
  42. #ifdef _AFXDLL
  43. #pragma warning(disable: 4275)  // deriving exported class from non-exported
  44. #pragma warning(disable: 4251)  // using non-exported as public in exported
  45. #endif
  46. #endif //!ALL_WARNINGS
  47.  
  48. #define STRICT 1
  49.  
  50. #ifndef _DEBUG
  51. #ifndef _AFX_ENABLE_INLINES
  52. #define _AFX_ENABLE_INLINES
  53. #endif
  54. #endif
  55.  
  56. #include <httpext.h>
  57. #include <httpfilt.h>
  58.  
  59. #ifndef _INC_STDLIB
  60.     #include <stdlib.h>
  61. #endif
  62. #ifndef _INC_TCHAR
  63.     #include <tchar.h>
  64. #endif
  65.  
  66. #ifndef UNUSED
  67. #ifdef _DEBUG
  68. #define UNUSED(x)
  69. #else
  70. #define UNUSED(x) x
  71. #endif
  72. #endif
  73.  
  74. #define AFXISAPI __stdcall
  75. #define AFXIS_DATADEF
  76. #define AFXISAPI_CDECL __cdecl
  77.  
  78. /////////////////////////////////////////////////////////////////////////////
  79. // Internet Server API Library
  80.  
  81. #ifndef _AFX_NOFORCE_LIBS
  82. #ifndef _MAC
  83.  
  84. #ifdef _AFXDLL
  85. #ifdef _DEBUG
  86.     #ifdef _UNICODE
  87.         #pragma comment(lib, "MFCISUD.lib")
  88.     #else
  89.         #pragma comment(lib, "EAFXISD.lib")
  90.     #endif
  91. #else
  92.     #ifdef _UNICODE
  93.         #pragma comment(lib, "MFCISU.lib")
  94.     #else
  95.         #pragma comment(lib, "EAFXIS.lib")
  96.     #endif // _UNICODE
  97. #endif // _DEBUG
  98. #else
  99. #ifdef _DEBUG
  100.     #ifdef _UNICODE
  101.         #pragma comment(lib, "UAFXISD.lib")
  102.     #else
  103.         #pragma comment(lib, "NAFXISD.lib")
  104.     #endif
  105. #else
  106.     #ifdef _UNICODE
  107.         #pragma comment(lib, "UAFXIS.lib")
  108.     #else
  109.         #pragma comment(lib, "NAFXIS.lib")
  110.     #endif // _UNICODE
  111. #endif // _DEBUG
  112. #endif // _AFXDLL
  113.  
  114. #pragma comment(lib, "kernel32.lib")
  115. #pragma comment(lib, "user32.lib")
  116. #pragma comment(lib, "winspool.lib")
  117. #pragma comment(lib, "advapi32.lib")
  118.  
  119. #endif // _MAC
  120. #endif // _AFX_NOFORCE_LIBS
  121.  
  122. extern HINSTANCE AFXISAPI AfxGetResourceHandle();
  123.  
  124. /////////////////////////////////////////////////////////////////////////////
  125. // AFXIASPI - MFC Internet Server API support
  126.  
  127. // Classes declared in this file
  128.  
  129. class CHtmlStream;
  130. class CHttpServerContext;
  131. class CHttpServer;
  132. class CHttpFilterContext;
  133. class CHttpFilter;
  134.  
  135. // Classes this file uses from elsewhere, sometimes
  136.  
  137. #ifdef _AFX
  138. class CLongBinary;
  139. class CByteArray;
  140. #endif
  141.  
  142. ///////////////////////////////////////////////////////////////////////
  143. // CHtmlStream -- manages in-memory HTML
  144.  
  145. class CHtmlStream
  146. {
  147. public:
  148. // Constructors
  149.     CHtmlStream(UINT nGrowBytes = 4096);
  150.     CHtmlStream(BYTE* lpBuffer, UINT nBufferSize, UINT nGrowBytes = 0);
  151.  
  152. // Operations
  153.     void Attach(BYTE* lpBuffer, UINT nBufferSize, UINT nGrowBytes = 0);
  154.     BYTE* Detach();
  155.     DWORD GetStreamSize() const;
  156.  
  157.     virtual void Abort();
  158.     virtual void Close();
  159.     virtual void InitStream();
  160.     virtual void Reset();
  161.  
  162.     virtual void Write(const void* lpBuf, UINT nCount);
  163.  
  164.     CHtmlStream& operator<<(LPCTSTR psz);
  165.     CHtmlStream& operator<<(short int w);
  166.     CHtmlStream& operator<<(long int dw);
  167.     CHtmlStream& operator<<(const CHtmlStream& stream);
  168.     CHtmlStream& operator<<(double d);
  169.     CHtmlStream& operator<<(float f);
  170.  
  171. #ifdef _AFX
  172.     CHtmlStream& operator<<(const CByteArray& array);
  173.     CHtmlStream& operator<<(const CLongBinary& blob);
  174. #endif
  175.  
  176. // Advanced Overridables
  177. protected:
  178.     virtual BYTE* Alloc(DWORD nBytes);
  179.     virtual BYTE* Realloc(BYTE* lpMem, DWORD nBytes);
  180.     virtual BYTE* Memcpy(BYTE* lpMemTarget, const BYTE* lpMemSource, UINT nBytes);
  181.     virtual void GrowStream(DWORD dwNewLen);
  182.  
  183.     DWORD   m_nStreamSize;
  184.  
  185. public:
  186.     virtual void Free(BYTE* lpMem);
  187.  
  188. // Implementation
  189. protected:
  190.     UINT    m_nGrowBytes;
  191.     DWORD   m_nPosition;
  192.     DWORD   m_nBufferSize;
  193.     BYTE*   m_lpBuffer;
  194.     BOOL    m_bAutoDelete;
  195.  
  196. public:
  197.     virtual ~CHtmlStream();
  198. };
  199.  
  200.  
  201. ///////////////////////////////////////////////////////////////////////
  202. // Status codes for HTTP transactions
  203.  
  204. #ifndef _WININET_ // these symbols may come from WININET.H
  205.  
  206. #define HTTP_STATUS_OK              200     // OK
  207. #define HTTP_STATUS_CREATED         201     // created
  208. #define HTTP_STATUS_ACCEPTED        202     // accepted
  209. #define HTTP_STATUS_NO_CONTENT      204     // no content
  210. #define HTTP_STATUS_REDIRECT        301     // moved permanently
  211. #define HTTP_STATUS_TEMP_REDIRECT   302     // moved temporarily
  212. #define HTTP_STATUS_NOT_MODIFIED    304     // not modified
  213. #define HTTP_STATUS_BAD_REQUEST     400     // bad request
  214. #define HTTP_STATUS_AUTH_REQUIRED   401     // unauthorized
  215. #define HTTP_STATUS_FORBIDDEN       403     // forbidden
  216. #define HTTP_STATUS_NOT_FOUND       404     // not found
  217. #define HTTP_STATUS_SERVER_ERROR    500     // internal server error
  218. #define HTTP_STATUS_NOT_IMPLEMENTED 501     // not implemented
  219. #define HTTP_STATUS_BAD_GATEWAY     502     // bad gateway
  220. #define HTTP_STATUS_SERVICE_NA      503     // service unavailable
  221.  
  222. #endif
  223.  
  224. ///////////////////////////////////////////////////////////////////////
  225. // Parse Map macros
  226.  
  227. #ifndef AFX_PARSE_CALL
  228. #define AFX_PARSE_CALL
  229. #endif
  230.  
  231. typedef void (AFX_PARSE_CALL CHttpServer::*AFX_PISAPICMD)(CHttpServerContext* pCtxt);
  232.  
  233. struct AFX_PARSEMAP_ENTRY;  // declared after CHttpServer, below
  234.  
  235. struct AFX_PARSEMAP
  236. {
  237.     UINT (PASCAL* pfnGetNumMapEntries)();
  238. #ifdef _AFXDLL
  239.     const AFX_PARSEMAP* (PASCAL* pfnGetBaseMap)();
  240. #else
  241.     const AFX_PARSEMAP* pBaseMap;
  242. #endif
  243.     const AFX_PARSEMAP_ENTRY* lpEntries;
  244.     ~AFX_PARSEMAP();
  245. };
  246.  
  247. struct AFX_PARSEMAP_ENTRY_PARAMS
  248. {
  249.     int nParams;            // number of parameters
  250.     int nRequired;          // number of parameters without defaults
  251.     // all of these are arrays!
  252.     LPTSTR* ppszInfo;       // pointers to name[2n], pointer to default[2n+1]
  253.     BYTE*   ppszDefaults;   // pointers to coerced default values
  254.     BYTE*   ppszValues;     // pointers to coerced actual values
  255.     ~AFX_PARSEMAP_ENTRY_PARAMS();
  256. };
  257.  
  258. #ifdef _AFXDLL
  259. #define DECLARE_PARSE_MAP() \
  260. private: \
  261.     static AFX_PARSEMAP_ENTRY _parseEntries[]; \
  262. public: \
  263.     static const AFX_PARSEMAP parseMap; \
  264.     static const AFX_PARSEMAP* PASCAL _GetBaseParseMap(); \
  265.     static UINT PASCAL GetNumMapEntries(); \
  266.     virtual const AFX_PARSEMAP* GetParseMap() const; \
  267.  
  268. #else
  269. #define DECLARE_PARSE_MAP() \
  270. private: \
  271.     static AFX_PARSEMAP_ENTRY _parseEntries[]; \
  272. public: \
  273.     static const AFX_PARSEMAP parseMap; \
  274.     static UINT PASCAL GetNumMapEntries(); \
  275.     virtual const AFX_PARSEMAP* GetParseMap() const; \
  276.  
  277. #endif // _AFXDLL
  278.  
  279. #ifdef _AFXDLL
  280. #define BEGIN_PARSE_MAP(theClass, baseClass) \
  281.     const AFX_PARSEMAP* PASCAL theClass::_GetBaseParseMap() \
  282.         { return &baseClass::parseMap; } \
  283.     typedef void (AFX_PARSE_CALL theClass::*theClass##CALL)(CHttpServerContext*); \
  284.     const AFX_PARSEMAP* theClass::GetParseMap() const \
  285.         { return &theClass::parseMap; } \
  286.     AFXIS_DATADEF const AFX_PARSEMAP theClass::parseMap = \
  287.         { &theClass::GetNumMapEntries, &theClass::_GetBaseParseMap, &theClass::_parseEntries[0] }; \
  288.     AFX_PARSEMAP_ENTRY theClass::_parseEntries[] = \
  289.     { \
  290.  
  291. #else
  292. #define BEGIN_PARSE_MAP(theClass, baseClass) \
  293.     typedef void (AFX_PARSE_CALL theClass::*theClass##CALL)(CHttpServerContext*); \
  294.     const AFX_PARSEMAP* theClass::GetParseMap() const \
  295.         { return &theClass::parseMap; } \
  296.     AFXIS_DATADEF const AFX_PARSEMAP theClass::parseMap = \
  297.         { &theClass::GetNumMapEntries, &baseClass::parseMap, &theClass::_parseEntries[0] }; \
  298.     AFX_PARSEMAP_ENTRY theClass::_parseEntries[] = \
  299.     { \
  300.  
  301. #endif
  302.  
  303. #define ON_PARSE_COMMAND(FnName, mapClass, Args) \
  304.     { _T(#FnName), (AFX_PISAPICMD) (mapClass##CALL)mapClass::FnName,\
  305.         Args, NULL },
  306.  
  307. #define ON_PARSE_COMMAND_PARAMS(Params) \
  308.     { NULL, (AFX_PISAPICMD) NULL, Params, NULL },
  309.  
  310. #define DEFAULT_PARSE_COMMAND(FnName, mapClass) \
  311.     { _T(#FnName), (AFX_PISAPICMD) (mapClass##CALL)mapClass::FnName,\
  312.         NULL, NULL },
  313.  
  314. #define END_PARSE_MAP(theClass) \
  315.     }; \
  316.     UINT PASCAL theClass::GetNumMapEntries() { \
  317.         return sizeof(theClass::_parseEntries) /\
  318.         sizeof(AFX_PARSEMAP_ENTRY); } \
  319.  
  320.  
  321. ///////////////////////////////////////////////////////////////////////
  322. //
  323.  
  324. class CHttpServerContext
  325. {
  326. public:
  327.     CHttpServerContext(EXTENSION_CONTROL_BLOCK* pECB);
  328.     virtual ~CHttpServerContext();
  329.  
  330. // Operations
  331.     BOOL GetServerVariable(LPTSTR lpszVariableName,
  332.         LPVOID lpvBuffer, LPDWORD lpdwSize);
  333.     BOOL WriteClient(LPVOID lpvBuffer, LPDWORD lpdwBytes, DWORD dwReserved = 0);
  334.     BOOL ReadClient(LPVOID lpvBuffer, LPDWORD lpdwSize);
  335.     BOOL ServerSupportFunction(DWORD dwHSERRequest,
  336.         LPVOID lpvBuffer, LPDWORD lpdwSize, LPDWORD lpdwDataType);
  337.  
  338.     CHttpServerContext& operator<<(LPCTSTR psz);
  339.     CHttpServerContext& operator<<(long int dw);
  340.     CHttpServerContext& operator<<(short int w);
  341.     CHttpServerContext& operator<<(const CHtmlStream& stream);
  342.     CHttpServerContext& operator<<(double d);
  343.     CHttpServerContext& operator<<(float f);
  344.  
  345. #ifdef _AFX
  346.     CHttpServerContext& operator<<(const CLongBinary& blob);
  347.     CHttpServerContext& operator<<(const CByteArray& array);
  348. #endif
  349.  
  350.     void Reset();
  351.  
  352. // Attributes
  353. public:
  354.     BOOL m_bSendHeaders;
  355.     EXTENSION_CONTROL_BLOCK* const m_pECB;
  356.     CHtmlStream* m_pStream;
  357.     DWORD m_dwEndOfHeaders;
  358. #ifdef _DEBUG
  359.     DWORD m_dwOldEndOfHeaders;
  360. #endif
  361. };
  362.  
  363.  
  364. ///////////////////////////////////////////////////////////////////////
  365. // Internet Information Server Extension Support
  366.  
  367. class CHttpServer
  368. {
  369. public:
  370.     CHttpServer(TCHAR cDelimiter = '&');
  371.     virtual ~CHttpServer();
  372.  
  373.     enum errors {
  374.         callOK = 0,         // everything is fine
  375.         callParamRequired,  // a required parameter was missing
  376.         callBadParamCount,  // there were too many or too few parameters
  377.         callBadCommand,     // the command name was not found
  378.         callNoStackSpace,   // no stack space was available
  379.         callNoStream,       // no CHtmlStream was available
  380.         callMissingQuote,   // a parameter had a bad format
  381.         callMissingParams,  // no parameters were available
  382.         callBadParam,       // a paremeter had a bad format (ie, only one quote)
  383.     };
  384.  
  385. // overridables
  386.     virtual int CallFunction(CHttpServerContext* pCtxt,
  387.         LPTSTR pszQuery, LPTSTR pszCommand);
  388.     virtual BOOL OnParseError(CHttpServerContext* pCtxt, int nCause);
  389.  
  390. // operations
  391.     virtual void EndContent(CHttpServerContext* pCtxt) const;
  392.     virtual void StartContent(CHttpServerContext* pCtxt) const;
  393.     virtual void WriteTitle(CHttpServerContext* pCtxt) const;
  394.     virtual LPCTSTR GetTitle() const;
  395.     void AddHeader(CHttpServerContext* pCtxt, LPCTSTR pszString) const;
  396.  
  397.     virtual DWORD HttpExtensionProc(EXTENSION_CONTROL_BLOCK *pECB);
  398.     virtual BOOL GetExtensionVersion(HSE_VERSION_INFO *pVer);
  399.     virtual CHtmlStream* ConstructStream();
  400.  
  401.     virtual BOOL InitInstance(CHttpServerContext* pCtxt);
  402.  
  403. // implementation
  404.  
  405. protected:
  406.     UINT PASCAL GetStackSize(const BYTE* pbParams);
  407.     int CallMemberFunc(CHttpServerContext* pCtxt,
  408.         const AFX_PARSEMAP_ENTRY* pEntry,
  409.         AFX_PARSEMAP_ENTRY* pParams, LPTSTR szParams);
  410.     LPTSTR GetQuery(CHttpServerContext* pCtxt, LPTSTR lpszQuery);
  411.     const AFX_PARSEMAP_ENTRY* LookUp(LPCTSTR szMethod,
  412.         const AFX_PARSEMAP*& pMap, AFX_PARSEMAP_ENTRY*& pParams,
  413.         AFX_PISAPICMD pCmdDefault = NULL);
  414.     int CountParams(LPCTSTR pszCommandLine, int& nCount);
  415.     int ParseDefaultParams(AFX_PARSEMAP_ENTRY* pParams,
  416.         int nParams, AFX_PARSEMAP_ENTRY_PARAMS*& pBlock,
  417.         const BYTE* pbTypes);
  418.     LPVOID PreprocessString(LPTSTR psz);
  419.     void BuildStatusCode(LPTSTR szResponse, DWORD dwCode);
  420.  
  421. #if defined(_PPC_) || defined(_MPPC_)
  422.     int PushDefaultStackArgs(BYTE* pStack,
  423.         CHttpServerContext* pCtxt, const BYTE* pbParams,
  424.         LPTSTR lpszParams, AFX_PARSEMAP_ENTRY_PARAMS* pDefParams,
  425.         int nSizeArgs);
  426.     int PushStackArgs(BYTE* pStack, CHttpServerContext* pCtxt,
  427.         const BYTE* pbParams, LPTSTR lpszParams, UINT nSizeArgs);
  428.     BYTE* StoreStackParameter(BYTE* pStack, BYTE nType,
  429.         LPTSTR pszCurParam, UINT nSizeArgs, BOOL bDoShadow);
  430.     BYTE* StoreRawStackParameter(BYTE* pStack, BYTE nType,
  431.         BYTE* pRawParam, int nSizeArgs);
  432. #else
  433.     int PushDefaultStackArgs(BYTE* pStack,
  434.         CHttpServerContext* pCtxt, const BYTE* pbParams,
  435.         LPTSTR lpszParams, AFX_PARSEMAP_ENTRY_PARAMS* pDefParams);
  436.     int PushStackArgs(BYTE* pStack, CHttpServerContext* pCtxt,
  437.         const BYTE* pbParams, LPTSTR lpszParams);
  438.     BYTE* StoreStackParameter(BYTE* pStack, BYTE nType, LPTSTR pszParam);
  439.     BYTE* StoreRawStackParameter(BYTE* pStack, BYTE nType, BYTE* pRawParam);
  440. #endif
  441.  
  442.     LPCRITICAL_SECTION m_pCritSec;
  443.     const TCHAR m_cTokenDelimiter;  // can't EVER change
  444.  
  445.     DECLARE_PARSE_MAP()
  446. };
  447.  
  448. extern "C" BOOL WINAPI GetExtensionVersion(HSE_VERSION_INFO *pVer);
  449. extern "C" DWORD WINAPI HttpExtensionProc(EXTENSION_CONTROL_BLOCK *pECB);
  450.  
  451. struct AFX_PARSEMAP_ENTRY
  452. {
  453.     LPTSTR          pszFnName;     // if default param entry, ptr to AFX_PARSEMAP_ENTRY_PARAMS
  454.     AFX_PISAPICMD   pfn;           // NULL if default param entry
  455.     LPCSTR          pszArgs;       // NULL if default function entry
  456.     LPSTR           pszParamInfo;  // copy of pszArgs for parsing
  457. };
  458.  
  459. ///////////////////////////////////////////////////////////////////////
  460. // Constants to describe parameter types
  461.  
  462. #define ITS_EMPTY           "\x06"      // no parameters
  463. #define ITS_I2              "\x01"      // a 'short'
  464. #define ITS_I4              "\x02"      // a 'long'
  465. #define ITS_R4              "\x03"      // a 'float'
  466. #define ITS_R8              "\x04"      // a 'double'
  467. #define ITS_PSTR            "\x05"      // a 'LPCTSTR'
  468.  
  469. enum INETVARENUM
  470. {
  471.     IT_I2       = 1,
  472.     IT_I4       = 2,
  473.     IT_R4       = 3,
  474.     IT_R8       = 4,
  475.     IT_PSTR     = 5,
  476.     IT_EMPTY    = 6,
  477. };
  478.  
  479.  
  480. ///////////////////////////////////////////////////////////////////////
  481. // Internet Information Server Entry Points
  482.  
  483. extern "C" DWORD WINAPI HttpFilterProc(PHTTP_FILTER_CONTEXT pfc,
  484.     DWORD dwNotificationType, LPVOID pvNotification);
  485.  
  486. extern "C" BOOL WINAPI GetFilterVersion(PHTTP_FILTER_VERSION pVer);
  487.  
  488.  
  489. ///////////////////////////////////////////////////////////////////////
  490. // Internet Information Server Filter Support
  491.  
  492. class CHttpFilterContext
  493. {
  494. public:
  495.     CHttpFilterContext(PHTTP_FILTER_CONTEXT pfc);
  496.     ~CHttpFilterContext() { }
  497.  
  498.     BOOL GetServerVariable(LPTSTR lpszVariableName, LPVOID lpvBuffer,
  499.         LPDWORD lpdwSize);
  500.     BOOL AddResponseHeaders(LPTSTR lpszHeaders, DWORD dwReserved = 0);
  501.     BOOL WriteClient(LPVOID lpvBuffer, LPDWORD lpdwBytes,
  502.         DWORD dwReserved = 0);
  503.     LPVOID AllocMem(DWORD cbSize, DWORD dwReserved = 0);
  504.     BOOL ServerSupportFunction(enum SF_REQ_TYPE sfReq,
  505.         LPVOID lpvBuffer, LPDWORD lpdwSize, LPDWORD lpdwDataType);
  506.  
  507.     PHTTP_FILTER_CONTEXT const m_pFC;
  508. };
  509.  
  510.  
  511. ///////////////////////////////////////////////////////////////////////
  512. //
  513.  
  514. class CHttpFilter
  515. {
  516. public:
  517.     CHttpFilter();
  518.     ~CHttpFilter();
  519.  
  520. protected:
  521.  
  522. public:
  523.     virtual DWORD HttpFilterProc(PHTTP_FILTER_CONTEXT pfc,
  524.         DWORD dwNotificationType, LPVOID pvNotification);
  525.     virtual BOOL GetFilterVersion(PHTTP_FILTER_VERSION pVer);
  526.  
  527.     virtual DWORD OnReadRawData(CHttpFilterContext* pfc, PHTTP_FILTER_RAW_DATA pRawData);
  528.     virtual DWORD OnPreprocHeaders(CHttpFilterContext* pfc, PHTTP_FILTER_PREPROC_HEADERS pHeaders);
  529.     virtual DWORD OnAuthentication(CHttpFilterContext* pfc, PHTTP_FILTER_AUTHENT pAuthent);
  530.     virtual DWORD OnUrlMap(CHttpFilterContext* pfc, PHTTP_FILTER_URL_MAP pUrlMap);
  531.     virtual DWORD OnSendRawData(CHttpFilterContext* pfc, PHTTP_FILTER_RAW_DATA pRawData);
  532.     virtual DWORD OnLog(CHttpFilterContext* pfc, PHTTP_FILTER_LOG pLog);
  533.     virtual DWORD OnEndOfNetSession(CHttpFilterContext* pfc);
  534.     virtual DWORD OnEndOfRequest(CHttpFilterContext* pfc);
  535. };
  536.  
  537.  
  538. /////////////////////////////////////////////////////////////////////////////
  539. // Alternate debugging suppot
  540.  
  541. #include <crtdbg.h>
  542.  
  543. #ifdef _AFX
  544. #define ISAPIASSERT(expr)                   ASSERT(expr)
  545. #define ISAPITRACE                          TRACE
  546. #define ISAPITRACE0(str)                    TRACE0(str)
  547. #define ISAPITRACE1(str, arg1)              TRACE1(str, arg1)
  548. #define ISAPITRACE2(str, arg1, arg2)        TRACE2(str, arg1, arg2)
  549. #define ISAPITRACE3(str, arg1, arg2, arg3)  TRACE3(str, arg1, arg2, arg3)
  550. #ifdef _DEBUG
  551. #define ISAPIVERIFY(f)                      ASSERT(f)
  552. #else
  553. #define ISAPIVERIFY(f)                      ((void)(f))
  554. #endif // _DEBUG
  555. #else // !_AFX
  556. #define ISAPIASSERT(expr)                   _ASSERTE(expr)
  557. #define ISAPITRACE0(str)                    _RPT0(_CRT_WARN, str)
  558. #define ISAPITRACE1(str, arg1)              _RPT1(_CRT_WARN, str, arg1)
  559. #define ISAPITRACE2(str, arg1, arg2)        _RPT2(_CRT_WARN, str, arg1, arg2)
  560. #define ISAPITRACE3(str, arg1, arg2, arg3)  _RPT3(_CRT_WARN, arg1, arg2, arg3)
  561. #ifdef _DEBUG
  562. void AFXISAPI_CDECL AfxISAPITrace(LPCTSTR lpszFormat, ...);
  563. #define ISAPIVERIFY(expr)                   _ASSERTE(expr)
  564. #define ISAPITRACE                          AfxISAPITrace
  565. #else
  566. inline void AfxISAPITrace(LPCTSTR, ...) { }
  567. #define ISAPIVERIFY(expr)                   ((void)(expr))
  568. #define ISAPITRACE                          AfxISAPITrace
  569. #endif // _DEBUG
  570. #endif // _AFX
  571.  
  572.  
  573. /////////////////////////////////////////////////////////////////////////////
  574. // Inline function declarations
  575.  
  576. #ifdef _AFX_ENABLE_INLINES
  577. #define _AFXISAPI_INLINE inline
  578. #include <afxisapi.inl>
  579. #endif
  580.  
  581. #undef AFX_DATA
  582. #define AFX_DATA
  583.  
  584. #ifdef _AFX_MINREBUILD
  585. #pragma component(minrebuild, on)
  586. #endif
  587. #ifndef _AFX_FULLTYPEINFO
  588. #pragma component(mintypeinfo, off)
  589. #endif
  590.  
  591. #endif // the whole file
  592.