Leaked source code of windows server 2003
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.

120 lines
3.1 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. IClassAccess *GetNextValidClassStore(CLASSCONTAINER** pStoreList,
  15. DWORD cStores,
  16. PSID pUserSid,
  17. PRSOPTOKEN pRsopToken,
  18. uCLSSPEC* pClassSpec,
  19. BOOL fCache,
  20. DWORD * pcount,
  21. HRESULT* phr);
  22. HRESULT GetUserClassStores(
  23. LPOLESTR pszClassStorePath,
  24. PCLASSCONTAINER **ppStoreList,
  25. DWORD *pcStores,
  26. BOOL *pfCache,
  27. PSID *ppUserSid);
  28. //
  29. // Link list pointer for Class Containers Seen
  30. //
  31. extern CLASSCONTAINER *gpContainerHead;
  32. //
  33. // Link list pointer for User Profiles Seen
  34. //
  35. extern USERPROFILE *gpUserHead;
  36. //
  37. // Global Class Factory for Class Container
  38. //
  39. extern CAppContainerCF *pCF;
  40. class CClassAccess :
  41. public IClassAccess
  42. {
  43. PCLASSCONTAINER *pStoreList;
  44. DWORD cStores;
  45. LPOLESTR m_pszClassStorePath;
  46. PRSOPTOKEN m_pRsopUserToken;
  47. public:
  48. CClassAccess(void);
  49. ~CClassAccess(void);
  50. // IUnknown
  51. HRESULT __stdcall QueryInterface(
  52. REFIID iid,
  53. void ** ppv );
  54. ULONG __stdcall AddRef();
  55. ULONG __stdcall Release();
  56. // IClassInfo
  57. HRESULT __stdcall GetAppInfo(
  58. uCLSSPEC * pClassSpec, // Class Spec (CLSID/Ext/MIME)
  59. QUERYCONTEXT * pQryContext, // Query Attributes
  60. PACKAGEDISPINFO * pPackageInfo
  61. );
  62. HRESULT __stdcall EnumPackages (
  63. LPOLESTR pszPackageName,
  64. GUID *pCategory,
  65. ULONGLONG *pLastUsn,
  66. DWORD dwAppFlags, // AppType options
  67. IEnumPackage **ppIEnumPackage
  68. );
  69. HRESULT __stdcall SetClassStorePath (
  70. LPOLESTR pszClassStorePath,
  71. void* pRsopUserToken
  72. );
  73. //---------------------------------------------------------------------
  74. protected:
  75. unsigned long m_uRefs;
  76. unsigned long m_cCalls;
  77. };
  78. class CClassAccessCF : public IClassFactory
  79. {
  80. public:
  81. CClassAccessCF();
  82. ~CClassAccessCF();
  83. virtual HRESULT __stdcall QueryInterface(REFIID riid, void * * ppvObject);
  84. virtual ULONG __stdcall AddRef();
  85. virtual ULONG __stdcall Release();
  86. virtual HRESULT __stdcall CreateInstance(IUnknown * pUnkOuter, REFIID riid, void * * ppvObject);
  87. virtual HRESULT __stdcall LockServer(BOOL fLock);
  88. protected:
  89. unsigned long m_uRefs;
  90. };