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.

108 lines
2.5 KiB

  1. //+------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1996 - 1997
  5. //
  6. // File: cclsacc.hxx
  7. //
  8. // Contents: Definitions for Class factory and IUnknown methods
  9. // for CClassAccess
  10. //
  11. // Author: DebiM
  12. //
  13. //-------------------------------------------------------------------------
  14. class CClassAccess :
  15. public IClassAccess
  16. {
  17. PCLASSCONTAINER *pStoreList;
  18. DWORD cStores;
  19. public:
  20. CClassAccess(void);
  21. ~CClassAccess(void);
  22. // IUnknown
  23. HRESULT __stdcall QueryInterface(
  24. REFIID iid,
  25. void ** ppv );
  26. ULONG __stdcall AddRef();
  27. ULONG __stdcall Release();
  28. // IClassInfo
  29. HRESULT __stdcall GetAppInfo(
  30. uCLSSPEC * pClassSpec, // Class Spec (CLSID/Ext/MIME)
  31. QUERYCONTEXT * pQryContext, // Query Attributes
  32. PACKAGEDISPINFO * pPackageInfo
  33. );
  34. HRESULT __stdcall EnumPackages (
  35. LPOLESTR pszPackageName,
  36. GUID *pCategory,
  37. ULONGLONG *pLastUsn,
  38. DWORD dwAppFlags, // AppType options
  39. IEnumPackage **ppIEnumPackage
  40. );
  41. //---------------------------------------------------------------------
  42. protected:
  43. unsigned long m_uRefs;
  44. unsigned long m_cCalls;
  45. };
  46. class CClassAccessCF : public IClassFactory
  47. {
  48. public:
  49. CClassAccessCF();
  50. ~CClassAccessCF();
  51. virtual HRESULT __stdcall QueryInterface(REFIID riid, void * * ppvObject);
  52. virtual ULONG __stdcall AddRef();
  53. virtual ULONG __stdcall Release();
  54. virtual HRESULT __stdcall CreateInstance(IUnknown * pUnkOuter, REFIID riid, void * * ppvObject);
  55. virtual HRESULT __stdcall LockServer(BOOL fLock);
  56. protected:
  57. unsigned long m_uRefs;
  58. };
  59. class CMergedEnumPackage : public IEnumPackage
  60. {
  61. public:
  62. // IUnknown methods
  63. HRESULT _stdcall QueryInterface(REFIID riid, void** ppObject);
  64. ULONG _stdcall AddRef();
  65. ULONG _stdcall Release();
  66. // IEnumPackage methods
  67. HRESULT __stdcall Next(ULONG celt,
  68. PACKAGEDISPINFO *rgelt,
  69. ULONG *pceltFetched
  70. );
  71. HRESULT __stdcall Skip(ULONG celt);
  72. HRESULT __stdcall Reset(void);
  73. HRESULT __stdcall Clone(IEnumPackage **ppenum);
  74. CMergedEnumPackage();
  75. ~CMergedEnumPackage();
  76. HRESULT Initialize(IEnumPackage **pcsEnum, ULONG cEnum);
  77. private:
  78. IEnumPackage **m_pcsEnum;
  79. ULONG m_cEnum;
  80. ULONG m_dwRefCount;
  81. ULONG m_csnum;
  82. };