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.

105 lines
1.8 KiB

  1. #pragma once
  2. #ifndef __ASSEMBLY_IDENTITY_H__
  3. #define __ASSEMBLY_IDENTITY_H__
  4. #include <sxsapi.h>
  5. #include <thash.h>
  6. #define ATTRIBUTE_TABLE_ARRAY_SIZE 0x10
  7. class CAssemblyIdentity : public IAssemblyIdentity
  8. {
  9. public:
  10. // IUnknown methods
  11. STDMETHODIMP QueryInterface(REFIID riid,void ** ppv);
  12. STDMETHODIMP_(ULONG) AddRef();
  13. STDMETHODIMP_(ULONG) Release();
  14. STDMETHOD(SetAttribute)(
  15. /* in */ LPCOLESTR pwzName,
  16. /* in */ LPCOLESTR pwzValue,
  17. /* in */ DWORD ccValue);
  18. STDMETHOD(GetAttribute)(
  19. /* in */ LPCOLESTR pwzName,
  20. /* out */ LPOLESTR *ppwzValue,
  21. /* out */ LPDWORD pccValue);
  22. STDMETHOD(GetDisplayName)(
  23. /* in */ DWORD dwFlags,
  24. /* out */ LPOLESTR *ppwzDisplayName,
  25. /* out */ LPDWORD pccDisplayName);
  26. STDMETHOD(GetCLRDisplayName)
  27. /* in */ (DWORD dwFlags,
  28. /* out */ LPOLESTR *ppwzDisplayName,
  29. /* out */ LPDWORD pccDisplayName);
  30. STDMETHOD(IsEqual )(
  31. /*in */ IAssemblyIdentity *pAssemblyId);
  32. CAssemblyIdentity();
  33. ~CAssemblyIdentity();
  34. private:
  35. DWORD _dwSig;
  36. DWORD _cRef;
  37. DWORD _hr;
  38. THashTable<CString, CString> _AttributeTable;
  39. HRESULT Init();
  40. friend HRESULT CreateAssemblyIdentity(
  41. LPASSEMBLY_IDENTITY *ppAssemblyId,
  42. DWORD dwFlags);
  43. friend HRESULT CreateAssemblyIdentityEx(
  44. LPASSEMBLY_IDENTITY *ppAssemblyId,
  45. DWORD dwFlags,
  46. LPWSTR wzDisplayName);
  47. friend HRESULT CloneAssemblyIdentity(
  48. LPASSEMBLY_IDENTITY pSrcAssemblyId,
  49. LPASSEMBLY_IDENTITY *ppDestAssemblyId);
  50. };
  51. #endif