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.

80 lines
2.9 KiB

  1. #include "resource.h" // main symbols
  2. #include "dplobby8.h"
  3. #define typedef__dxj_DirectPlayLobbiedApplication IDirectPlay8LobbiedApplication*
  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_DirectPlayLobbiedApplicationObject :
  9. #ifdef USING_IDISPATCH
  10. public CComDualImpl<I_dxj_DirectPlayLobbiedApplication, &IID_I_dxj_DirectPlayLobbiedApplication, &LIBID_DIRECTLib>,
  11. public ISupportErrorInfo,
  12. #else
  13. public I_dxj_DirectPlayLobbiedApplication,
  14. #endif
  15. public CComObjectRoot
  16. {
  17. public:
  18. C_dxj_DirectPlayLobbiedApplicationObject() ;
  19. virtual ~C_dxj_DirectPlayLobbiedApplicationObject() ;
  20. BEGIN_COM_MAP(C_dxj_DirectPlayLobbiedApplicationObject)
  21. COM_INTERFACE_ENTRY(I_dxj_DirectPlayLobbiedApplication)
  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_DirectPlayLobbiedApplicationObject)
  28. #ifdef USING_IDISPATCH
  29. // ISupportsErrorInfo
  30. STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
  31. #endif
  32. // I_dxj_DirectPlayLobbiedApplication
  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 RegisterMessageHandler(I_dxj_DirectPlayLobbyEvent *lobbyEvent, long *lDPNHandle);
  39. HRESULT STDMETHODCALLTYPE RegisterProgram(DPL_PROGRAM_DESC_CDESC *ProgramDesc,long lFlags);
  40. HRESULT STDMETHODCALLTYPE UnRegisterProgram(BSTR guidApplication,long lFlags);
  41. HRESULT STDMETHODCALLTYPE Send(long Target,SAFEARRAY **Buffer,long lBufferSize,long lFlags);
  42. HRESULT STDMETHODCALLTYPE SetAppAvailable(VARIANT_BOOL fAvailable, long lFlags);
  43. HRESULT STDMETHODCALLTYPE UpdateStatus(long LobbyClient, long lStatus);
  44. HRESULT STDMETHODCALLTYPE Close();
  45. HRESULT STDMETHODCALLTYPE UnRegisterMessageHandler();
  46. HRESULT STDMETHODCALLTYPE GetConnectionSettings(long hLobbyClient, long lFlags, DPL_CONNECTION_SETTINGS_CDESC *ConnectionSettings);
  47. HRESULT STDMETHODCALLTYPE SetConnectionSettings(long hTarget, long lFlags, DPL_CONNECTION_SETTINGS_CDESC *ConnectionSettings, I_dxj_DirectPlayAddress *HostAddress, I_dxj_DirectPlayAddress *Device);
  48. HRESULT STDMETHODCALLTYPE GetVBConnSettings(DPL_CONNECTION_SETTINGS *OldCon, DPL_CONNECTION_SETTINGS_CDESC *NewCon);
  49. ////////////////////////////////////////////////////////////////////////
  50. //
  51. // note: this is public for the callbacks
  52. DECL_VARIABLE(_dxj_DirectPlayLobbiedApplication);
  53. private:
  54. BOOL m_fInit;
  55. public:
  56. DX3J_GLOBAL_LINKS(_dxj_DirectPlayLobbiedApplication);
  57. DWORD InternalAddRef();
  58. DWORD InternalRelease();
  59. BOOL m_fHandleEvents;
  60. IStream *m_pEventStream;
  61. };