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.

151 lines
5.5 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1999
  6. //
  7. // File: dxglob7obj.h
  8. //
  9. //--------------------------------------------------------------------------
  10. #include "resource.h" // main symbols
  11. typedef HRESULT (__stdcall *DSOUNDCREATE)(GUID FAR * lpGUID, LPDIRECTSOUND8 * ppDS, IUnknown FAR *pUnkOuter );
  12. typedef HRESULT (__stdcall *DSOUNDCAPTURECREATE)(GUID FAR * lpGUID, LPDIRECTSOUNDCAPTURE * ppDS, IUnknown FAR *pUnkOuter );
  13. typedef HRESULT (CALLBACK *DSOUNDENUMERATE)(LPDSENUMCALLBACK lpCallback, LPVOID lpContext );
  14. typedef HRESULT (CALLBACK *DSOUNDCAPTUREENUMERATE)(LPDSENUMCALLBACK lpCallback, LPVOID lpContext );
  15. typedef LPDIRECT3DDEVICE8 (__stdcall *D3DCREATE8)(DWORD ver);
  16. typedef struct tag_EVENTTHREADINFO {
  17. HANDLE hEvent;
  18. struct tag_EVENTTHREADINFO *pNext;
  19. IStream *pStream;
  20. I_dxj_DirectXEvent8 *pCallback;
  21. DWORD threadID;
  22. HANDLE hThread;
  23. BOOL fEnd;
  24. HANDLE hEndEvent;
  25. } EVENTTHREADINFO;
  26. class C_dxj_DirectX7Object :
  27. public I_dxj_DirectX8,
  28. public CComCoClass<C_dxj_DirectX7Object, &CLSID__dxj_DirectX8>, public CComObjectRoot
  29. {
  30. public:
  31. C_dxj_DirectX7Object() ;
  32. virtual ~C_dxj_DirectX7Object() ;
  33. BEGIN_COM_MAP(C_dxj_DirectX7Object)
  34. COM_INTERFACE_ENTRY(I_dxj_DirectX8)
  35. END_COM_MAP()
  36. DECLARE_REGISTRY(CLSID__dxj_DirectX8, "DIRECT.DirectX8.0", "DIRECT.DirectX8.0", IDS_DIRECTX8_DESC, THREADFLAGS_BOTH)
  37. // Use DECLARE_NOT_AGGREGATABLE(C_dxj_DirectSoundResourceObject) if you don't want your object
  38. // to support aggregation
  39. DECLARE_AGGREGATABLE(C_dxj_DirectX7Object)
  40. public:
  41. HRESULT STDMETHODCALLTYPE directSoundCreate(
  42. /* [in] */ BSTR guid,
  43. /* [retval][out] */ I_dxj_DirectSound __RPC_FAR *__RPC_FAR *ret);
  44. HRESULT STDMETHODCALLTYPE directSoundCaptureCreate(
  45. /* [in] */ BSTR guid,
  46. /* [retval][out] */ I_dxj_DirectSoundCapture __RPC_FAR *__RPC_FAR *ret);
  47. HRESULT STDMETHODCALLTYPE getDSEnum(
  48. /* [retval][out] */ I_dxj_DSEnum __RPC_FAR *__RPC_FAR *retVal);
  49. HRESULT STDMETHODCALLTYPE getDSCaptureEnum(
  50. /* [retval][out] */ I_dxj_DSEnum __RPC_FAR *__RPC_FAR *retVal);
  51. HRESULT STDMETHODCALLTYPE directInputCreate(
  52. /* [retval][out] */ I_dxj_DirectInput8 __RPC_FAR *__RPC_FAR *ret);
  53. HRESULT STDMETHODCALLTYPE DirectPlayVoiceClientCreate(
  54. /* [retval][out] */ I_dxj_DirectPlayVoiceClient __RPC_FAR *__RPC_FAR *ret);
  55. HRESULT STDMETHODCALLTYPE DirectPlayVoiceServerCreate(
  56. /* [retval][out] */ I_dxj_DirectPlayVoiceServer __RPC_FAR *__RPC_FAR *ret);
  57. HRESULT STDMETHODCALLTYPE DirectPlayVoiceTestCreate(
  58. /* [retval][out] */ I_dxj_DirectPlayVoiceSetup __RPC_FAR *__RPC_FAR *ret);
  59. HRESULT STDMETHODCALLTYPE directMusicLoaderCreate(
  60. /* [retval][out] */ I_dxj_DirectMusicLoader __RPC_FAR *__RPC_FAR *ret);
  61. HRESULT STDMETHODCALLTYPE directMusicComposerCreate(
  62. /* [retval][out] */ I_dxj_DirectMusicComposer __RPC_FAR *__RPC_FAR *ret);
  63. HRESULT STDMETHODCALLTYPE directMusicPerformanceCreate(
  64. /* [retval][out] */ I_dxj_DirectMusicPerformance __RPC_FAR *__RPC_FAR *ret);
  65. #ifdef _WIN64
  66. HRESULT STDMETHODCALLTYPE createEvent(
  67. /* [in] */ I_dxj_DirectXEvent8 __RPC_FAR *event,
  68. /* [retval][out] */ HANDLE __RPC_FAR *h) ;
  69. HRESULT STDMETHODCALLTYPE setEvent(
  70. /* [in] */ HANDLE eventId) ;
  71. HRESULT STDMETHODCALLTYPE destroyEvent(
  72. /* [in] */ HANDLE eventId) ;
  73. #else
  74. HRESULT STDMETHODCALLTYPE createEvent(
  75. /* [in] */ I_dxj_DirectXEvent8 __RPC_FAR *event,
  76. /* [retval][out] */ LONG __RPC_FAR *h) ;
  77. HRESULT STDMETHODCALLTYPE setEvent(
  78. /* [in] */ LONG eventId) ;
  79. HRESULT STDMETHODCALLTYPE destroyEvent(
  80. /* [in] */ LONG eventId) ;
  81. #endif
  82. HRESULT STDMETHODCALLTYPE createNewGuid(BSTR *ret);
  83. HRESULT STDMETHODCALLTYPE DirectXFileCreate(I_dxj_DirectXFile **ret);
  84. HRESULT STDMETHODCALLTYPE DirectPlayPeerCreate(I_dxj_DirectPlayPeer **ret);
  85. HRESULT STDMETHODCALLTYPE DirectPlayServerCreate(I_dxj_DirectPlayServer **ret);
  86. HRESULT STDMETHODCALLTYPE DirectPlayClientCreate(I_dxj_DirectPlayClient **ret);
  87. HRESULT STDMETHODCALLTYPE DirectPlayAddressCreate(I_dxj_DirectPlayAddress **ret);
  88. HRESULT STDMETHODCALLTYPE Direct3DCreate(IUnknown **ppRet);
  89. HRESULT STDMETHODCALLTYPE DirectPlayLobbyClientCreate(I_dxj_DirectPlayLobbyClient **ret);
  90. HRESULT STDMETHODCALLTYPE DirectPlayLobbiedApplicationCreate(I_dxj_DirectPlayLobbiedApplication **ret);
  91. void LoadDSOUND();
  92. void LoadDINPUT();
  93. void LoadD3D8();
  94. private:
  95. DSOUNDCREATE m_pDirectSoundCreate;
  96. DSOUNDCAPTURECREATE m_pDirectSoundCaptureCreate;
  97. DSOUNDENUMERATE m_pDirectSoundEnumerate;
  98. DSOUNDCAPTUREENUMERATE m_pDirectSoundCaptureEnumerate;
  99. D3DCREATE8 m_pDirect3DCreate8;
  100. EVENTTHREADINFO *m_pEventList;
  101. };