Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

97 lines
3.0 KiB

  1. //
  2. // MODULE: LocalECB.H
  3. //
  4. // PURPOSE: Interface of CLocalECB class, which implements CAbstractECB by emulating Win32's
  5. // EXTENSION_CONTROL_BLOCK.
  6. //
  7. // PROJECT: Generic Troubleshooter DLL for Microsoft AnswerPoint - Local TS only
  8. //
  9. // COMPANY: Saltmine Creative, Inc. (206)-284-7511 [email protected]
  10. //
  11. // AUTHOR: Joe Mabel
  12. //
  13. // ORIGINAL DATE: 01-07-99
  14. //
  15. // NOTES:
  16. //
  17. // Version Date By Comments
  18. //--------------------------------------------------------------------
  19. // V3.1 01-07-99 JM Original
  20. //
  21. #if !defined(_AFX_LOCAL_INCLUDED_)
  22. #define _AFX_LOCAL_INCLUDED_
  23. #if _MSC_VER >= 1000
  24. #pragma once
  25. #endif // _MSC_VER >= 1000
  26. #include "apgtsECB.h"
  27. #include "TSNameValueMgr.h"
  28. #include "apgtsstr.h"
  29. class CRenderConnector;
  30. class CLocalECB : public CAbstractECB, public CTSNameValueMgr
  31. {
  32. // emulating EXTENSION_CONTROL_BLOCK data members
  33. DWORD m_dwHttpStatusCode; // only of relevance for debugging.
  34. CString& m_strWriteClient;
  35. HANDLE m_hEvent; // handler of event, main thread is waiting for;
  36. // if NULL, main thread is not waiting for anything.
  37. CRenderConnector* m_pRenderConnector; // pointer to ATL control connector;
  38. // if NULL, write result page to m_strWriteClient,
  39. // otherwise call CRenderConnector::Render function.
  40. public:
  41. CLocalECB( const VARIANT& name, const VARIANT& value, int count, HANDLE hEvent,
  42. CString* pstrWriteClient, CRenderConnector* pRenderConnector,
  43. bool bSetLocale, CString& strLocaleSetting );
  44. CLocalECB( const CArrNameValue& arr, HANDLE hEvent, CString* pstrWriteClient,
  45. CRenderConnector* pRenderConnector,
  46. bool bSetLocale, CString& strLocaleSetting );
  47. CLocalECB(CString* pstrWriteClient);
  48. ~CLocalECB();
  49. // ======= inherited pure virtuals must be redefined =======
  50. virtual HCONN GetConnID() const;
  51. virtual DWORD SetHttpStatusCode(DWORD dwHttpStatusCode);
  52. virtual LPSTR GetMethod() const;
  53. virtual LPSTR GetQueryString() const;
  54. virtual DWORD GetBytesAvailable() const;
  55. virtual LPBYTE GetData() const;
  56. virtual LPSTR GetContentType() const;
  57. virtual BOOL GetServerVariable
  58. ( /*HCONN hConn,*/
  59. LPCSTR lpszVariableName, // note, more const-ness than EXTENSION_CONTROL_BLOCK
  60. LPVOID lpvBuffer,
  61. LPDWORD lpdwSize );
  62. virtual BOOL WriteClient
  63. ( /*HCONN ConnID,*/
  64. LPCSTR Buffer, // EXTENSION_CONTROL_BLOCK::WriteClient uses LPVOID, but it should
  65. // only be legit to pass SBCS text, so we're enforcing that.
  66. // Also, we're adding const-ness.
  67. LPDWORD lpdwBytes
  68. /* , DWORD dwReserved */
  69. );
  70. virtual BOOL ServerSupportFunction
  71. ( /*HCONN hConn,*/ // we always use the HCONN for this same COnlineECB
  72. DWORD dwHSERRequest,
  73. LPVOID lpvBuffer,
  74. LPDWORD lpdwSize,
  75. LPDWORD lpdwDataType );
  76. // specific for CLocalECB class
  77. public:
  78. const CString& GetWriteClient() const; // get data written by WriteClient()
  79. private:
  80. // Specific for setting locales.
  81. bool m_bSetLocale;
  82. CString m_strLocaleSetting;
  83. };
  84. #endif // !defined(_AFX_LOCAL_INCLUDED_)