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.

66 lines
2.0 KiB

  1. #pragma once
  2. #include "cor.h"
  3. #define ASM_MANIFEST_IMPORT_DEFAULT_ARRAY_SIZE 32
  4. class CAssemblyManifestImportCLR: public IAssemblyManifestImport
  5. {
  6. public:
  7. STDMETHODIMP QueryInterface(REFIID riid,void ** ppv);
  8. STDMETHODIMP_(ULONG) AddRef();
  9. STDMETHODIMP_(ULONG) Release();
  10. CAssemblyManifestImportCLR();
  11. ~CAssemblyManifestImportCLR();
  12. STDMETHOD(GetAssemblyIdentity)(
  13. /* out */ IAssemblyIdentity **ppName);
  14. STDMETHOD(GetNextAssembly)(DWORD nIndex, IManifestInfo **ppName);
  15. STDMETHOD(GetNextFile)(DWORD nIndex, IManifestInfo **ppImport);
  16. STDMETHOD(ReportManifestType)(
  17. /*out*/ DWORD *pdwType);
  18. //Functions not implemented
  19. STDMETHOD(GetSubscriptionInfo)(
  20. /* out */ IManifestInfo **ppSubsInfo);
  21. STDMETHOD(GetNextPlatform)(
  22. /* in */ DWORD nIndex,
  23. /* out */ IManifestData **ppPlatformInfo);
  24. STDMETHOD(GetManifestApplicationInfo)(
  25. /* out */ IManifestInfo **ppAppInfo);
  26. STDMETHOD(QueryFile)(
  27. /* in */ LPCOLESTR pwzFileName,
  28. /* out */ IManifestInfo **ppAssemblyFile);
  29. STDMETHOD(Init)(LPCWSTR szManifestFilePath);
  30. private:
  31. DWORD _dwSig;
  32. DWORD _cRef;
  33. HRESULT _hr;
  34. WCHAR _szManifestFilePath[MAX_PATH];
  35. DWORD _ccManifestFilePath;
  36. IAssemblyIdentity *_pName;
  37. IMetaDataAssemblyImport *_pMDImport;
  38. PBYTE _pMap;
  39. mdAssembly *_rAssemblyRefTokens;
  40. DWORD _cAssemblyRefTokens;
  41. mdFile *_rAssemblyModuleTokens;
  42. DWORD _cAssemblyModuleTokens;
  43. };
  44. STDAPI CreateAssemblyManifestImportCLR(LPCWSTR szManifestFilePath, IAssemblyManifestImport **ppImport);
  45. STDAPI DeAllocateAssemblyMetaData(ASSEMBLYMETADATA *pamd);
  46. STDAPI AllocateAssemblyMetaData(ASSEMBLYMETADATA *pamd);