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
3.0 KiB

  1. //+------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1996 - 1997
  5. //
  6. // File: cclsto.hxx
  7. //
  8. // Contents: Definition for Class factory and IUnknown methods
  9. // for CAppContainer
  10. //
  11. // Author: DebiM
  12. //
  13. //-------------------------------------------------------------------------
  14. class CAppContainerCF : public IClassFactory
  15. {
  16. public:
  17. CAppContainerCF();
  18. ~CAppContainerCF();
  19. virtual HRESULT __stdcall QueryInterface(REFIID riid, void * * ppvObject);
  20. virtual ULONG __stdcall AddRef();
  21. virtual ULONG __stdcall Release();
  22. virtual HRESULT __stdcall CreateInstance(IUnknown * pUnkOuter, REFIID riid, void * * ppvObject);
  23. virtual HRESULT __stdcall LockServer(BOOL fLock);
  24. HRESULT __stdcall CreateConnectedInstance(
  25. LPOLESTR pszPath,
  26. void * * ppvObject);
  27. protected:
  28. unsigned long m_uRefs;
  29. };
  30. //
  31. // ClassContainer class.
  32. //
  33. class CAppContainer :
  34. public IClassAccess
  35. {
  36. private:
  37. WCHAR m_szContainerName[_MAX_PATH];
  38. WCHAR m_szClassName [_MAX_PATH];
  39. WCHAR m_szPackageName [_MAX_PATH];
  40. BOOL m_fOpen;
  41. IADsContainer * m_ADsContainer;
  42. IADs * m_pADsClassStore;
  43. IADsContainer * m_ADsClassContainer;
  44. IADsContainer * m_ADsPackageContainer;
  45. IDBCreateCommand * m_pIDBCreateCommand;
  46. //
  47. // End of temporary variables.
  48. //
  49. public:
  50. CAppContainer();
  51. CAppContainer(LPOLESTR pszPath, HRESULT *phr);
  52. ~CAppContainer(void);
  53. // IUnknown
  54. HRESULT __stdcall QueryInterface(
  55. REFIID iid,
  56. void ** ppv );
  57. ULONG __stdcall AddRef();
  58. ULONG __stdcall Release();
  59. //
  60. // IClassAccess
  61. //
  62. HRESULT __stdcall GetAppInfo(
  63. uCLSSPEC * pClassSpec, // Class Spec (CLSID/Ext/MIME)
  64. QUERYCONTEXT * pQryContext, // Query Attributes
  65. INSTALLINFO * pInstallInfo
  66. );
  67. HRESULT __stdcall EnumPackages (
  68. LPOLESTR pszPackageName,
  69. GUID *pCategory,
  70. ULONGLONG *pLastUsn,
  71. DWORD dwAppFlags, // AppType options
  72. IEnumPackage **ppIEnumPackage
  73. );
  74. //
  75. // IClassRefresh
  76. //
  77. /* HRESULT __stdcall GetUpgrades (
  78. ULONG cClasses,
  79. CLSID *pClassList, // CLSIDs Installed
  80. CSPLATFORM Platform,
  81. LCID dwLocale,
  82. PACKAGEINFOLIST *pPackageInfoList);
  83. HRESULT __stdcall CommitUpgrades ();
  84. */
  85. //
  86. // Utility functions
  87. //
  88. HRESULT __stdcall GetPackageDetails (
  89. LPOLESTR pszPackageName,
  90. PACKAGEDETAIL *pPackageDetail
  91. );
  92. HRESULT __stdcall UpdateUsn(CSUSN *pStoreUsn);
  93. HRESULT __stdcall GetStoreUsn(CSUSN *pStoreUsn);
  94. //----------------------------------------------------------------------
  95. protected:
  96. unsigned long m_uRefs;
  97. };