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.

90 lines
3.3 KiB

  1. /*==========================================================================
  2. *
  3. * Copyright (C) 2000 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: ClassFac.h
  6. * Content: DirectPlay Lobby class factory header file
  7. *@@BEGIN_MSINTERNAL
  8. * History:
  9. * Date By Reason
  10. * ==== == ======
  11. * 02/21/00 mjn Created
  12. * 06/07/00 rodtoll Bug #34383 Must provide CLSID for each IID to fix issues with Whistler
  13. *@@END_MSINTERNAL
  14. *
  15. ***************************************************************************/
  16. #ifndef __CLASSFAC_H__
  17. #define __CLASSFAC_H__
  18. //**********************************************************************
  19. // Constant definitions
  20. //**********************************************************************
  21. //**********************************************************************
  22. // Macro definitions
  23. //**********************************************************************
  24. //**********************************************************************
  25. // Structure definitions
  26. //**********************************************************************
  27. typedef struct _INTERFACE_LIST INTERFACE_LIST;
  28. typedef struct _OBJECT_DATA OBJECT_DATA;
  29. //
  30. // COM interface for class factory
  31. //
  32. #undef INTERFACE // External COM Implementation
  33. #define INTERFACE IDirectPlayLobbyClassFact
  34. DECLARE_INTERFACE_(IDirectPlayLobbyClassFact,IUnknown)
  35. {
  36. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) PURE;
  37. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  38. STDMETHOD_(ULONG,Release) (THIS) PURE;
  39. STDMETHOD(CreateInstance) (THIS_ LPUNKNOWN lpUnkOuter, REFIID riid, LPVOID *ppvObj) PURE;
  40. STDMETHOD(LockServer) (THIS_ BOOL bLock) PURE;
  41. };
  42. typedef struct _IDirectPlayLobbyClassFact { // Internal Implementation (overlay's external imp.)
  43. IDirectPlayLobbyClassFactVtbl *lpVtbl; // lpVtbl Must be first element (to match external imp.)
  44. LONG lRefCount;
  45. DWORD dwLocks;
  46. CLSID clsid;
  47. } _IDirectPlayLobbyClassFact, *_PIDirectPlayLobbyClassFact;
  48. //**********************************************************************
  49. // Variable definitions
  50. //**********************************************************************
  51. //
  52. // VTable for class factory
  53. //
  54. extern IDirectPlayLobbyClassFactVtbl DPLCF_Vtbl;
  55. //**********************************************************************
  56. // Function prototypes
  57. //**********************************************************************
  58. // DirectPlay - IUnknown
  59. STDMETHODIMP DPL_QueryInterface(LPVOID lpv, REFIID riid,LPVOID *ppvObj);
  60. STDMETHODIMP_(ULONG) DPL_AddRef(LPVOID lphObj);
  61. STDMETHODIMP_(ULONG) DPL_Release(LPVOID lphObj);
  62. // Class Factory
  63. STDMETHODIMP DPLCF_QueryInterface(IDirectPlayLobbyClassFact *pInterface,REFIID riid,LPVOID *ppvObj);
  64. STDMETHODIMP_(ULONG) DPLCF_AddRef(IDirectPlayLobbyClassFact *pInterface);
  65. STDMETHODIMP_(ULONG) DPLCF_Release(IDirectPlayLobbyClassFact *pInterface);
  66. STDMETHODIMP DPLCF_CreateInstance(IDirectPlayLobbyClassFact *pInterface,LPUNKNOWN lpUnkOuter,REFIID riid,LPVOID *ppv);
  67. STDMETHODIMP DPLCF_LockServer(IDirectPlayLobbyClassFact *pInterface,BOOL bLock);
  68. // Class Factory - supporting
  69. HRESULT DPLCF_CreateObject(LPVOID *lplpv,REFIID riid);
  70. HRESULT DPLCF_FreeObject(LPVOID lpv);
  71. HRESULT DPL_CreateInterface(OBJECT_DATA* lpObject,REFIID riid,INTERFACE_LIST** const ppv);
  72. INTERFACE_LIST* DPL_FindInterface(LPVOID lpv, REFIID riid);
  73. #endif // __CLASSFAC_H__