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.

119 lines
2.8 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. public:
  18. CClassAccess(void);
  19. ~CClassAccess(void);
  20. // IUnknown
  21. HRESULT __stdcall QueryInterface(
  22. REFIID iid,
  23. void ** ppv );
  24. ULONG __stdcall AddRef();
  25. ULONG __stdcall Release();
  26. // IClassInfo
  27. HRESULT __stdcall GetAppInfo(
  28. uCLSSPEC * pClassSpec, // Class Spec (CLSID/Ext/MIME)
  29. QUERYCONTEXT * pQryContext, // Query Attributes
  30. INSTALLINFO * pInstallInfo
  31. );
  32. HRESULT __stdcall EnumPackages (
  33. LPOLESTR pszPackageName,
  34. GUID *pCategory,
  35. ULONGLONG *pLastUsn,
  36. DWORD dwAppFlags, // AppType options
  37. IEnumPackage **ppIEnumPackage
  38. );
  39. //
  40. // IClassRefresh
  41. //
  42. /* HRESULT __stdcall GetUpgrades (
  43. ULONG cClasses,
  44. CLSID *pClassList, // CLSIDs Installed
  45. CSPLATFORM Platform,
  46. LCID dwLocale,
  47. PACKAGEINFOLIST *pPackageInfoList);
  48. HRESULT __stdcall CommitUpgrades ();
  49. */
  50. //---------------------------------------------------------------------
  51. protected:
  52. unsigned long m_uRefs;
  53. unsigned long m_cCalls;
  54. };
  55. class CClassAccessCF : public IClassFactory
  56. {
  57. public:
  58. CClassAccessCF();
  59. ~CClassAccessCF();
  60. virtual HRESULT __stdcall QueryInterface(REFIID riid, void * * ppvObject);
  61. virtual ULONG __stdcall AddRef();
  62. virtual ULONG __stdcall Release();
  63. virtual HRESULT __stdcall CreateInstance(IUnknown * pUnkOuter, REFIID riid, void * * ppvObject);
  64. virtual HRESULT __stdcall LockServer(BOOL fLock);
  65. protected:
  66. unsigned long m_uRefs;
  67. };
  68. class CMergedEnumPackage : public IEnumPackage
  69. {
  70. public:
  71. // IUnknown methods
  72. HRESULT _stdcall QueryInterface(REFIID riid, void** ppObject);
  73. ULONG _stdcall AddRef();
  74. ULONG _stdcall Release();
  75. // IEnumPackage methods
  76. HRESULT __stdcall Next(ULONG celt,
  77. PACKAGEDISPINFO *rgelt,
  78. ULONG *pceltFetched);
  79. HRESULT __stdcall Skip(ULONG celt);
  80. HRESULT __stdcall Reset(void);
  81. HRESULT __stdcall Clone(IEnumPackage **ppenum);
  82. CMergedEnumPackage();
  83. ~CMergedEnumPackage();
  84. HRESULT Initialize(IEnumPackage **pcsEnum, ULONG cEnum);
  85. private:
  86. IEnumPackage **m_pcsEnum;
  87. ULONG m_cEnum;
  88. ULONG m_dwRefCount;
  89. ULONG m_csnum;
  90. };