Commit dd9b0edb authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

fusion: Handle loading 64-bit .NET assemblies.

parent 48524c9b
...@@ -58,7 +58,7 @@ struct tagASSEMBLY ...@@ -58,7 +58,7 @@ struct tagASSEMBLY
HANDLE hmap; HANDLE hmap;
BYTE *data; BYTE *data;
IMAGE_NT_HEADERS32 *nthdr; IMAGE_NT_HEADERS *nthdr;
IMAGE_COR20_HEADER *corhdr; IMAGE_COR20_HEADER *corhdr;
METADATAHDR *metadatahdr; METADATAHDR *metadatahdr;
...@@ -647,7 +647,15 @@ static HRESULT parse_pe_header(ASSEMBLY *assembly) ...@@ -647,7 +647,15 @@ static HRESULT parse_pe_header(ASSEMBLY *assembly)
if (!assembly->nthdr) if (!assembly->nthdr)
return E_FAIL; return E_FAIL;
if (assembly->nthdr->FileHeader.Machine == IMAGE_FILE_MACHINE_AMD64)
{
IMAGE_OPTIONAL_HEADER64 *opthdr =
(IMAGE_OPTIONAL_HEADER64 *)&assembly->nthdr->OptionalHeader;
datadirs = opthdr->DataDirectory;
}
else
datadirs = assembly->nthdr->OptionalHeader.DataDirectory; datadirs = assembly->nthdr->OptionalHeader.DataDirectory;
if (!datadirs) if (!datadirs)
return E_FAIL; return E_FAIL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment