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.

105 lines
2.8 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. sxsname.h
  5. Abstract:
  6. IAssemblyName implementation for MSI
  7. Author:
  8. Xiaoyu Wu (xiaoyuw) May 2000
  9. Revision History:
  10. xiaoyuw 09/29//2000 replace attributes with AssemblyIdentity
  11. --*/
  12. #if !defined(_FUSION_SXS_ASMNAME_H_INCLUDED_)
  13. #define _FUSION_SXS_ASMNAME_H_INCLUDED_
  14. #pragma once
  15. #include "fusion.h"
  16. #include "ForwardDeclarations.h"
  17. #include "FusionBuffer.h"
  18. typedef
  19. enum _SXS_ASSEMBLY_NAME_PROPERTY
  20. {
  21. SXS_ASM_NAME_NAME = 0,
  22. SXS_ASM_NAME_VERSION = SXS_ASM_NAME_NAME+ 1,
  23. SXS_ASM_NAME_PROCESSORARCHITECTURE = SXS_ASM_NAME_VERSION+ 1,
  24. SXS_ASM_NAME_LANGUAGE = SXS_ASM_NAME_PROCESSORARCHITECTURE + 1
  25. }SXS_ASSEMBLY_NAME_PROPERTY;
  26. class CAssemblyName : public IAssemblyName
  27. {
  28. private:
  29. DWORD m_cRef;
  30. PASSEMBLY_IDENTITY m_pAssemblyIdentity;
  31. BOOL m_fIsFinalized;
  32. public:
  33. // IUnknown methods
  34. STDMETHODIMP QueryInterface(REFIID riid,void ** ppv);
  35. STDMETHODIMP_(ULONG) AddRef();
  36. STDMETHODIMP_(ULONG) Release();
  37. // IAssemblyName methods
  38. STDMETHOD(SetProperty)(
  39. /* in */ DWORD PropertyId,
  40. /* in */ LPVOID pvProperty,
  41. /* in */ DWORD cbProperty);
  42. STDMETHOD(GetProperty)(
  43. /* in */ DWORD PropertyId,
  44. /* out */ LPVOID pvProperty,
  45. /* in out */ LPDWORD pcbProperty);
  46. STDMETHOD(Finalize)();
  47. STDMETHOD(GetDisplayName)(
  48. /* [out] */ LPOLESTR szDisplayName,
  49. /* in out */ LPDWORD pcbDisplayName,
  50. /* [in] */ DWORD dwDisplayFlags);
  51. STDMETHOD(GetName)(
  52. /* [out][in] */ LPDWORD lpcbBuffer,
  53. /* [out] */ WCHAR __RPC_FAR *pwzName);
  54. STDMETHOD(GetVersion)(
  55. /* [out] */ LPDWORD pwVersionHi,
  56. /* [out] */ LPDWORD pwVersionLow);
  57. STDMETHOD (IsEqual)(
  58. /* [in] */ LPASSEMBLYNAME pName,
  59. /* [in] */ DWORD dwCmpFlags);
  60. STDMETHOD(BindToObject)(
  61. /* in */ REFIID refIID,
  62. /* in */ IAssemblyBindSink *pAsmBindSink,
  63. /* in */ IApplicationContext *pAppCtx,
  64. /* in */ LPCOLESTR szCodebase,
  65. /* in */ LONGLONG llFlags,
  66. /* in */ LPVOID pvReserved,
  67. /* in */ DWORD cbReserved,
  68. /* out */ VOID **ppv);
  69. STDMETHODIMP Clone(IAssemblyName **ppName);
  70. HRESULT Parse(LPCWSTR szDisplayName);
  71. CAssemblyName();
  72. ~CAssemblyName();
  73. HRESULT Init(LPCWSTR szDisplayName, PVOID pData);
  74. HRESULT GetInstalledAssemblyName(DWORD Flags, ULONG PathType, CBaseStringBuffer &rbuffPath);
  75. HRESULT DetermineAssemblyType( BOOL &fIsPolicy );
  76. HRESULT IsAssemblyInstalled(BOOL & fInstalled);
  77. };
  78. #endif