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.

90 lines
2.3 KiB

  1. /*++
  2. Copyright (C) 1996-2001 Microsoft Corporation
  3. Module Name:
  4. Abstract:
  5. History:
  6. --*/
  7. #ifndef __RPCSEND_H__
  8. #define __RPCSEND_H__
  9. #include <unk.h>
  10. #include <comutl.h>
  11. #include <wstring.h>
  12. #include <sync.h>
  13. #include "wmimsg.h"
  14. /**************************************************************************
  15. CMsgRpcSender
  16. ***************************************************************************/
  17. class CMsgRpcSender
  18. : public CUnkBase<IWmiMessageSender,&IID_IWmiMessageSender>
  19. {
  20. public:
  21. CMsgRpcSender( CLifeControl* pCtl )
  22. : CUnkBase<IWmiMessageSender,&IID_IWmiMessageSender>( pCtl ) { }
  23. STDMETHOD(Open)( LPCWSTR wszTarget,
  24. DWORD dwFlags,
  25. WMIMSG_SNDR_AUTH_INFOP pAuthInfo,
  26. LPCWSTR wszResponse,
  27. IWmiMessageTraceSink* pTraceSink,
  28. IWmiMessageSendReceive** ppSend );
  29. };
  30. /**************************************************************************
  31. CMsgRpcSend
  32. ***************************************************************************/
  33. class CMsgRpcSend
  34. : public CUnkBase<IWmiMessageSendReceive,&IID_IWmiMessageSendReceive>
  35. {
  36. CCritSec m_cs;
  37. WString m_wsTarget;
  38. WString m_wsComputer;
  39. WString m_wsTargetPrincipal;
  40. DWORD m_dwFlags;
  41. BOOL m_bInit;
  42. RPC_BINDING_HANDLE m_hBinding;
  43. CWbemPtr<IWmiMessageTraceSink> m_pTraceSink;
  44. void Clear();
  45. HRESULT PerformSend( PBYTE pData,
  46. ULONG cData,
  47. PBYTE pAuxData,
  48. ULONG cAuxData );
  49. HRESULT HandleTrace( HRESULT hRes, LPCWSTR wszTrace, IUnknown* pCtx );
  50. public:
  51. CMsgRpcSend( CLifeControl* pCtl,
  52. LPCWSTR wszTarget,
  53. DWORD dwFlags,
  54. WMIMSG_SNDR_AUTH_INFOP pAuthInfo,
  55. LPCWSTR wszResponse,
  56. IWmiMessageTraceSink* pTraceSink );
  57. STDMETHOD(SendReceive)( PBYTE pData,
  58. ULONG cData,
  59. PBYTE pAuxData,
  60. ULONG cAuxData,
  61. DWORD dwFlagStatus,
  62. IUnknown* pContext );
  63. virtual ~CMsgRpcSend();
  64. HRESULT EnsureSender();
  65. };
  66. #endif // __RPCSEND_H__