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.

86 lines
2.7 KiB

  1. #include "resource.h" // main symbols
  2. #include "dpaddr.h"
  3. #define typedef__dxj_DirectPlayAddress IDirectPlay8Address*
  4. /////////////////////////////////////////////////////////////////////////////
  5. // Direct Net Peer
  6. //REVIEW -- using pointers to ID's is necessary because some compilers don't like
  7. //references as template arguments.
  8. class C_dxj_DirectPlayAddressObject :
  9. #ifdef USING_IDISPATCH
  10. public CComDualImpl<I_dxj_DirectPlayAddress, &IID_I_dxj_DirectPlayAddress, &LIBID_DIRECTLib>,
  11. public ISupportErrorInfo,
  12. #else
  13. public I_dxj_DirectPlayAddress,
  14. #endif
  15. public CComObjectRoot
  16. {
  17. public:
  18. C_dxj_DirectPlayAddressObject() ;
  19. virtual ~C_dxj_DirectPlayAddressObject() ;
  20. BEGIN_COM_MAP(C_dxj_DirectPlayAddressObject)
  21. COM_INTERFACE_ENTRY(I_dxj_DirectPlayAddress)
  22. #ifdef USING_IDISPATCH
  23. COM_INTERFACE_ENTRY(IDispatch)
  24. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  25. #endif
  26. END_COM_MAP()
  27. DECLARE_AGGREGATABLE(C_dxj_DirectPlayAddressObject)
  28. #ifdef USING_IDISPATCH
  29. // ISupportsErrorInfo
  30. STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
  31. #endif
  32. // I_dxj_DirectPlayAddress
  33. public:
  34. /* [hidden] */ HRESULT STDMETHODCALLTYPE InternalSetObject(
  35. /* [in] */ IUnknown __RPC_FAR *lpdd);
  36. /* [hidden] */ HRESULT STDMETHODCALLTYPE InternalGetObject(
  37. /* [retval][out] */ IUnknown __RPC_FAR *__RPC_FAR *lpdd);
  38. HRESULT STDMETHODCALLTYPE BuildFromURL(BSTR SourceURL);
  39. HRESULT STDMETHODCALLTYPE Duplicate(I_dxj_DirectPlayAddress **NewAddress);
  40. HRESULT STDMETHODCALLTYPE Clear();
  41. HRESULT STDMETHODCALLTYPE GetURL(BSTR *URL);
  42. HRESULT STDMETHODCALLTYPE GetSP(BSTR *guidSP);
  43. HRESULT STDMETHODCALLTYPE GetUserData(void *UserData, long *lBufferSize);
  44. HRESULT STDMETHODCALLTYPE SetSP(BSTR guidSP);
  45. HRESULT STDMETHODCALLTYPE SetUserData(void *UserData, long lDataSize);
  46. HRESULT STDMETHODCALLTYPE GetNumComponents(long *lNumComponents);
  47. HRESULT STDMETHODCALLTYPE GetDevice(BSTR *guidDevice);
  48. HRESULT STDMETHODCALLTYPE SetDevice(BSTR guidDevice);
  49. HRESULT STDMETHODCALLTYPE SetEqual(I_dxj_DirectPlayAddress *Address);
  50. HRESULT STDMETHODCALLTYPE AddComponentLong(BSTR sComponent, long lValue);
  51. HRESULT STDMETHODCALLTYPE AddComponentString(BSTR sComponent, BSTR sValue);
  52. HRESULT STDMETHODCALLTYPE GetComponentLong(BSTR sComponent, long *lValue);
  53. HRESULT STDMETHODCALLTYPE GetComponentString(BSTR sComponent, BSTR *sValue);
  54. ////////////////////////////////////////////////////////////////////////
  55. //
  56. // note: this is public for the callbacks
  57. DECL_VARIABLE(_dxj_DirectPlayAddress);
  58. private:
  59. public:
  60. DX3J_GLOBAL_LINKS(_dxj_DirectPlayAddress);
  61. DWORD InternalAddRef();
  62. DWORD InternalRelease();
  63. void *m_pUserData;
  64. DWORD m_dwUserDataSize;
  65. };