home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / mfc / include / afxisapi.inl < prev    next >
Text File  |  1998-06-16  |  4KB  |  124 lines

  1. // This is a part of the Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1995-1998 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. // Inlines for AFXISAPI.H
  12.  
  13. #ifdef _AFXISAPI_INLINE
  14.  
  15. _AFXISAPI_INLINE CHttpServerContext::CHttpServerContext(EXTENSION_CONTROL_BLOCK* pECB)
  16. #ifdef _DEBUG
  17.     : m_dwStatusCode(DWORD(-1)), m_bSendHeaders(TRUE), m_pECB(pECB),
  18.       m_pStream(NULL), m_dwEndOfHeaders(0), m_dwOldEndOfHeaders(0),
  19.       m_dwChunkSize(0)
  20. #else
  21.     : m_dwStatusCode(DWORD(-1)), m_bSendHeaders(TRUE), m_pECB(pECB),
  22.       m_pStream(NULL), m_dwEndOfHeaders(0), m_dwChunkSize(0)
  23. #endif
  24.     { }
  25.  
  26. _AFXISAPI_INLINE CHttpServerContext::~CHttpServerContext()
  27.     { if (m_pStream != NULL) delete m_pStream; }
  28.  
  29. _AFXISAPI_INLINE CHttpServerContext& CHttpServerContext::operator<<(double d)
  30.     { ISAPIASSERT(m_pStream != NULL);
  31.         if (m_pStream != NULL) *m_pStream << d;
  32.         return *this; }
  33.  
  34. _AFXISAPI_INLINE CHttpServerContext& CHttpServerContext::operator<<(float f)
  35.     { ISAPIASSERT(m_pStream != NULL);
  36.         if (m_pStream != NULL) *m_pStream << f;
  37.         return *this; }
  38.  
  39. _AFXISAPI_INLINE CHttpServerContext& CHttpServerContext::operator<<(long int dw)
  40.     { ISAPIASSERT(m_pStream != NULL);
  41.         if (m_pStream != NULL) *m_pStream << dw;
  42.         return *this; }
  43.  
  44. _AFXISAPI_INLINE CHttpServerContext& CHttpServerContext::operator<<(short int w)
  45.     { ISAPIASSERT(m_pStream != NULL);
  46.         if (m_pStream != NULL) *m_pStream << w;
  47.         return *this; }
  48.  
  49. _AFXISAPI_INLINE CHttpServerContext& CHttpServerContext::operator<<(const CHtmlStream& stream)
  50.     { ISAPIASSERT(m_pStream != NULL);
  51.         if (m_pStream != NULL) *m_pStream << stream;
  52.         return *this; }
  53.  
  54. _AFXISAPI_INLINE CHttpServerContext& CHttpServerContext::operator<<(LPCTSTR psz)
  55.     { ISAPIASSERT(m_pStream != NULL && psz != NULL);
  56.         if (m_pStream != NULL && psz != NULL) *m_pStream << psz;
  57.         return *this; }
  58.  
  59. _AFXISAPI_INLINE BOOL CHttpServerContext::GetServerVariable(LPTSTR lpszVariableName,
  60.         LPVOID lpvBuffer, LPDWORD lpdwSize)
  61.     {
  62.         return m_pECB->GetServerVariable(m_pECB->ConnID,
  63.             lpszVariableName, lpvBuffer, lpdwSize);
  64.     }
  65.  
  66. _AFXISAPI_INLINE BOOL CHttpServerContext::WriteClient(LPVOID pBuffer, LPDWORD lpdwBytes,
  67.     DWORD dwReserved /* = 0 */)
  68.     {
  69.         return m_pECB->WriteClient(m_pECB->ConnID, pBuffer,
  70.             lpdwBytes, dwReserved);
  71.     }
  72.  
  73. _AFXISAPI_INLINE BOOL CHttpServerContext::ReadClient(LPVOID lpvBuffer, LPDWORD lpdwSize)
  74.     {
  75.         return m_pECB->ReadClient(m_pECB->ConnID, lpvBuffer, lpdwSize);
  76.     }
  77.  
  78. _AFXISAPI_INLINE BOOL CHttpServerContext::ServerSupportFunction(DWORD dwHSERRequest,
  79.         LPVOID lpvBuffer, LPDWORD lpdwSize, LPDWORD lpdwDataType)
  80.     {
  81.         return m_pECB->ServerSupportFunction(m_pECB->ConnID, dwHSERRequest,
  82.             lpvBuffer, lpdwSize, lpdwDataType);
  83.     }
  84.  
  85.  
  86. _AFXISAPI_INLINE DWORD CHtmlStream::GetStreamSize() const
  87.     { return m_nStreamSize; }
  88.  
  89.  
  90. _AFXISAPI_INLINE CHttpFilterContext::CHttpFilterContext(PHTTP_FILTER_CONTEXT pCtx)
  91.     : m_pFC(pCtx)
  92.     { }
  93.  
  94. _AFXISAPI_INLINE BOOL CHttpFilterContext::GetServerVariable(LPTSTR lpszVariableName,
  95.         LPVOID lpvBuffer, LPDWORD lpdwSize)
  96.     {
  97.         return m_pFC->GetServerVariable(m_pFC, lpszVariableName, lpvBuffer, lpdwSize);
  98.     }
  99. _AFXISAPI_INLINE BOOL CHttpFilterContext::AddResponseHeaders(LPTSTR lpszHeaders,
  100.         DWORD dwReserved /* = 0 */)
  101.     {
  102.         return m_pFC->AddResponseHeaders(m_pFC, lpszHeaders, dwReserved);
  103.     }
  104. _AFXISAPI_INLINE BOOL CHttpFilterContext::WriteClient(LPVOID lpvBuffer,
  105.         LPDWORD lpdwBytes, DWORD dwReserved /* = 0 */)
  106.     {
  107.         return m_pFC->WriteClient(m_pFC, lpvBuffer, lpdwBytes, dwReserved);
  108.     }
  109. _AFXISAPI_INLINE LPVOID CHttpFilterContext::AllocMem(DWORD cbSize,
  110.         DWORD dwReserved /* = 0 */)
  111.     {
  112.         return m_pFC->AllocMem(m_pFC, cbSize, dwReserved);
  113.     }
  114. _AFXISAPI_INLINE BOOL CHttpFilterContext::ServerSupportFunction(enum SF_REQ_TYPE sfReq,
  115.         LPVOID lpvBuffer, LPDWORD lpdwSize, LPDWORD lpdwDataType)
  116.     {
  117. //WINBUG: HTTPFLT.H has the last two params as type DWORD
  118.         return m_pFC->ServerSupportFunction(m_pFC, sfReq, lpvBuffer,
  119.             (DWORD) lpdwSize, (DWORD) lpdwDataType);
  120.     }
  121.  
  122.  
  123. #endif // _AFXISAPI_INLINE
  124.