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.

65 lines
2.2 KiB

  1. #ifndef __FCONSEND_H__
  2. #define __FCONSEND_H__
  3. #include <sync.h>
  4. #include <unk.h>
  5. #include <wbemcli.h>
  6. #include <comutl.h>
  7. #include <wstring.h>
  8. #include "wmimsg.h"
  9. /*********************************************************************
  10. CFwdConsSend - fwdcons senders handle issues with resolving logical
  11. target names and also setting up alternate destinations - for
  12. example, when sending using async qos, the it will try to use a
  13. dcom sender and then resort to an msmq sender.
  14. **********************************************************************/
  15. class CFwdConsSend
  16. : public CUnkBase<IWmiMessageSendReceive,&IID_IWmiMessageSendReceive>
  17. {
  18. CCritSec m_cs;
  19. WString m_wsTarget;
  20. DWORD m_dwFlags;
  21. BOOL m_bResolved;
  22. CWbemPtr<IWbemServices> m_pDefaultSvc;
  23. CWbemPtr<IWmiMessageMultiSendReceive> m_pMultiSend;
  24. CWbemPtr<IWmiMessageTraceSink> m_pTraceSink;
  25. CFwdConsSend( CLifeControl* pCtl )
  26. : CUnkBase<IWmiMessageSendReceive,&IID_IWmiMessageSendReceive>(pCtl),
  27. m_bResolved(FALSE) { }
  28. void DeriveQueueLogicalName( WString& rwsPathName, BOOL bAuth );
  29. HRESULT HandleTrace( HRESULT hr, IUnknown* pCtx );
  30. HRESULT AddAsyncSender( LPCWSTR wszMachine );
  31. HRESULT AddPhysicalSender( LPCWSTR wszMachine );
  32. HRESULT AddMSMQSender( LPCWSTR wszFormatName );
  33. HRESULT AddSyncSender( LPCWSTR wszMachine );
  34. HRESULT AddLogicalSender( LPCWSTR wszTarget );
  35. HRESULT AddLogicalSender( LPCWSTR wszObjPath, LPCWSTR wszProp );
  36. HRESULT EnsureSender();
  37. public:
  38. STDMETHOD(SendReceive)( PBYTE pData,
  39. ULONG cData,
  40. PBYTE pAuxData,
  41. ULONG cAuxData,
  42. DWORD dwFlagStatus,
  43. IUnknown* pCtx );
  44. static HRESULT Create( CLifeControl* pCtl,
  45. LPCWSTR wszTarget,
  46. DWORD dwFlags,
  47. IWbemServices* pDefaultSvc,
  48. IWmiMessageTraceSink* pTraceSink,
  49. IWmiMessageSendReceive** ppSend );
  50. };
  51. #endif // __FCONSEND_H__