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.

69 lines
1.6 KiB

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