Leaked source code of windows server 2003
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.

53 lines
1.3 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name :
  4. context.h
  5. Abstract:
  6. A class to retrieve and release ASP intrinsics
  7. Author:
  8. Neil Allain ( a-neilal ) August-1997
  9. Revision History:
  10. --*/
  11. #pragma once
  12. #ifndef _CONTEXT_H_
  13. #define _CONTEXT_H_
  14. class CContext
  15. {
  16. public:
  17. enum {
  18. get_Server = 0x0001,
  19. get_Response = 0x0002,
  20. get_Request = 0x0004,
  21. get_Session = 0x0008,
  22. get_Application = 0x0010
  23. };
  24. HRESULT Init( DWORD );
  25. IRequest* Request(){ _ASSERT(m_piRequest!=NULL); return m_piRequest; }
  26. IResponse* Response(){ _ASSERT(m_piResponse!=NULL); return m_piResponse; }
  27. ISessionObject* Session(){ _ASSERT(m_piSession!=NULL); return m_piSession; }
  28. IServer* Server(){ _ASSERT(m_piServer!=NULL); return m_piServer; }
  29. IApplicationObject* Application(){ _ASSERT(m_piApplication!=NULL); return m_piApplication; }
  30. static HRESULT GetServerObject( IGetContextProperties*, BSTR, const IID&, void** );
  31. private:
  32. CComPtr<IRequest> m_piRequest; //Request Object
  33. CComPtr<IResponse> m_piResponse; //Response Object
  34. CComPtr<ISessionObject> m_piSession; //Session Object
  35. CComPtr<IServer> m_piServer; //Server Object
  36. CComPtr<IApplicationObject> m_piApplication; //Application Object
  37. };
  38. #endif // !_CONTEXT_H_