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.

72 lines
1.7 KiB

  1. /*++
  2. Copyright (C) 1996-2001 Microsoft Corporation
  3. Module Name:
  4. Abstract:
  5. History:
  6. --*/
  7. #ifndef __MSMQCTX_H__
  8. #define __MSMQCTX_H__
  9. #include <wmimsg.h>
  10. #include "msmqhdr.h"
  11. /*************************************************************************
  12. CMsgMsmqRcvrCtx
  13. **************************************************************************/
  14. class CMsgMsmqRcvrCtx : public IWmiMessageReceiverContext
  15. {
  16. CMsgMsmqHdr* m_pHdr;
  17. PSID m_pSenderSid;
  18. BOOL m_bAuth;
  19. public:
  20. CMsgMsmqRcvrCtx( CMsgMsmqHdr* pHdr,
  21. PSID pSenderSid,
  22. BOOL bAuth )
  23. : m_pHdr(pHdr), m_pSenderSid(pSenderSid), m_bAuth(bAuth) {}
  24. STDMETHOD_(ULONG,AddRef)() { return 1; }
  25. STDMETHOD_(ULONG,Release)() { return 1; }
  26. STDMETHOD(QueryInterface)( REFIID riid, void** ppv )
  27. {
  28. if ( riid == IID_IUnknown || riid == IID_IWmiMessageReceiverContext )
  29. {
  30. *ppv = (IWmiMessageReceiverContext*)this;
  31. return S_OK;
  32. }
  33. return E_NOINTERFACE;
  34. }
  35. STDMETHOD(GetTimeSent)( SYSTEMTIME* pTime );
  36. STDMETHOD(GetSendingMachine)( WCHAR* awchMachine,
  37. ULONG cMachine,
  38. ULONG* pcMachine );
  39. STDMETHOD(GetTarget)( WCHAR* awchTarget,
  40. ULONG cTarget,
  41. ULONG* pcTarget );
  42. STDMETHOD(GetSenderId)( PBYTE achSenderId,
  43. ULONG cSenderId,
  44. ULONG* pcSenderId );
  45. STDMETHOD(IsSenderAuthenticated)();
  46. STDMETHOD(ImpersonateSender)() { return WBEM_E_NOT_SUPPORTED; }
  47. STDMETHOD(RevertToSelf)() { return WBEM_E_NOT_SUPPORTED; }
  48. };
  49. #endif // __MSMQCTX_H__