fusion: Add a helper to retrieve the runtime version for an assembly.
This commit is contained in:
parent
84863dfff7
commit
2ed8056a2b
|
@ -567,7 +567,7 @@ static HRESULT parse_metadata_header(ASSEMBLY *assembly, DWORD *hdrsz)
|
|||
size = FIELD_OFFSET(METADATAHDR, Version);
|
||||
memcpy(assembly->metadatahdr, metadatahdr, size);
|
||||
|
||||
/* we don't care about the version string */
|
||||
assembly->metadatahdr->Version = (LPSTR)&metadatahdr->Version;
|
||||
|
||||
ofs = FIELD_OFFSET(METADATAHDR, Flags);
|
||||
ptr += FIELD_OFFSET(METADATAHDR, Version) + metadatahdr->VersionLength + 1;
|
||||
|
@ -901,3 +901,9 @@ done:
|
|||
|
||||
return hr;
|
||||
}
|
||||
|
||||
HRESULT assembly_get_runtime_version(ASSEMBLY *assembly, LPSTR *version)
|
||||
{
|
||||
*version = assembly->metadatahdr->Version;
|
||||
return S_OK;
|
||||
}
|
||||
|
|
|
@ -435,6 +435,7 @@ HRESULT assembly_get_path(const ASSEMBLY *assembly, LPWSTR *path) DECLSPEC_HIDDE
|
|||
HRESULT assembly_get_version(ASSEMBLY *assembly, LPWSTR *version) DECLSPEC_HIDDEN;
|
||||
BYTE assembly_get_architecture(ASSEMBLY *assembly) DECLSPEC_HIDDEN;
|
||||
HRESULT assembly_get_pubkey_token(ASSEMBLY *assembly, LPWSTR *token) DECLSPEC_HIDDEN;
|
||||
HRESULT assembly_get_runtime_version(ASSEMBLY *assembly, LPSTR *version) DECLSPEC_HIDDEN;
|
||||
|
||||
extern HRESULT IAssemblyName_SetPath(IAssemblyName *iface, LPCWSTR path) DECLSPEC_HIDDEN;
|
||||
extern HRESULT IAssemblyName_GetPath(IAssemblyName *iface, LPWSTR buf, ULONG *len) DECLSPEC_HIDDEN;
|
||||
|
|
Loading…
Reference in New Issue