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.

107 lines
3.0 KiB

  1. /*++
  2. Copyright (c) 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_ASM_NAME_TYPE = SXS_ASM_NAME_LANGUAGE + 1,
  26. SXS_ASM_NAME_PUBLICKEYTOKEN = SXS_ASM_NAME_TYPE + 1
  27. }SXS_ASSEMBLY_NAME_PROPERTY;
  28. class CAssemblyName : public IAssemblyName
  29. {
  30. private:
  31. DWORD m_cRef;
  32. PASSEMBLY_IDENTITY m_pAssemblyIdentity;
  33. BOOL m_fIsFinalized;
  34. public:
  35. // IUnknown methods
  36. STDMETHODIMP QueryInterface(REFIID riid,void ** ppv);
  37. STDMETHODIMP_(ULONG) AddRef();
  38. STDMETHODIMP_(ULONG) Release();
  39. // IAssemblyName methods
  40. STDMETHOD(SetProperty)(
  41. /* in */ DWORD PropertyId,
  42. /* in */ LPVOID pvProperty,
  43. /* in */ DWORD cbProperty);
  44. STDMETHOD(GetProperty)(
  45. /* in */ DWORD PropertyId,
  46. /* out */ LPVOID pvProperty,
  47. /* in out */ LPDWORD pcbProperty);
  48. STDMETHOD(Finalize)();
  49. STDMETHOD(GetDisplayName)(
  50. /* [out] */ LPOLESTR szDisplayName,
  51. /* in out */ LPDWORD pcbDisplayName,
  52. /* [in] */ DWORD dwDisplayFlags);
  53. STDMETHOD(GetName)(
  54. /* [out][in] */ LPDWORD lpcbBuffer,
  55. /* [out] */ WCHAR __RPC_FAR *pwzName);
  56. STDMETHOD(GetVersion)(
  57. /* [out] */ LPDWORD pwVersionHi,
  58. /* [out] */ LPDWORD pwVersionLow);
  59. STDMETHOD (IsEqual)(
  60. /* [in] */ LPASSEMBLYNAME pName,
  61. /* [in] */ DWORD dwCmpFlags);
  62. STDMETHOD(BindToObject)(
  63. /* in */ REFIID refIID,
  64. /* in */ IAssemblyBindSink *pAsmBindSink,
  65. /* in */ IApplicationContext *pAppCtx,
  66. /* in */ LPCOLESTR szCodebase,
  67. /* in */ LONGLONG llFlags,
  68. /* in */ LPVOID pvReserved,
  69. /* in */ DWORD cbReserved,
  70. /* out */ VOID **ppv);
  71. STDMETHODIMP Clone(IAssemblyName **ppName);
  72. HRESULT Parse(LPCWSTR szDisplayName);
  73. CAssemblyName();
  74. ~CAssemblyName();
  75. HRESULT Init(LPCWSTR szDisplayName, PVOID pData);
  76. HRESULT GetInstalledAssemblyName(DWORD Flags, ULONG PathType, CBaseStringBuffer &rbuffPath);
  77. HRESULT DetermineAssemblyType( BOOL &fIsPolicy );
  78. HRESULT IsAssemblyInstalled(BOOL & fInstalled);
  79. };
  80. #endif