Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
08cbe5d2
Commit
08cbe5d2
authored
May 21, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
May 21, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fusion: Use the PEKIND type where appropriate.
parent
2ed8056a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
5 deletions
+14
-5
asmcache.c
dlls/fusion/asmcache.c
+11
-2
assembly.c
dlls/fusion/assembly.c
+2
-2
fusionpriv.h
dlls/fusion/fusionpriv.h
+1
-1
No files found.
dlls/fusion/asmcache.c
View file @
08cbe5d2
...
...
@@ -94,7 +94,7 @@ static BOOL create_full_path(LPCWSTR path)
return
ret
;
}
static
BOOL
get_assembly_directory
(
LPWSTR
dir
,
DWORD
size
,
BYTE
architecture
)
static
BOOL
get_assembly_directory
(
LPWSTR
dir
,
DWORD
size
,
PEKIND
architecture
)
{
static
const
WCHAR
gac
[]
=
{
'\\'
,
'a'
,
's'
,
's'
,
'e'
,
'm'
,
'b'
,
'l'
,
'y'
,
'\\'
,
'G'
,
'A'
,
'C'
,
0
};
...
...
@@ -107,6 +107,9 @@ static BOOL get_assembly_directory(LPWSTR dir, DWORD size, BYTE architecture)
switch
(
architecture
)
{
case
peNone
:
break
;
case
peMSIL
:
strcatW
(
dir
,
msil
);
break
;
...
...
@@ -118,6 +121,10 @@ static BOOL get_assembly_directory(LPWSTR dir, DWORD size, BYTE architecture)
case
peAMD64
:
strcatW
(
dir
,
amd64
);
break
;
default:
WARN
(
"unhandled architecture %u
\n
"
,
architecture
);
return
FALSE
;
}
return
TRUE
;
...
...
@@ -372,6 +379,7 @@ static HRESULT WINAPI IAssemblyCacheImpl_InstallAssembly(IAssemblyCache *iface,
WCHAR
path
[
MAX_PATH
];
WCHAR
asmdir
[
MAX_PATH
];
LPWSTR
ext
;
PEKIND
architecture
;
HRESULT
hr
;
TRACE
(
"(%p, %d, %s, %p)
\n
"
,
iface
,
dwFlags
,
...
...
@@ -410,7 +418,8 @@ static HRESULT WINAPI IAssemblyCacheImpl_InstallAssembly(IAssemblyCache *iface,
cache_lock
(
cache
);
get_assembly_directory
(
asmdir
,
MAX_PATH
,
assembly_get_architecture
(
assembly
));
architecture
=
assembly_get_architecture
(
assembly
);
get_assembly_directory
(
asmdir
,
MAX_PATH
,
architecture
);
sprintfW
(
path
,
format
,
asmdir
,
name
,
version
,
token
);
...
...
dlls/fusion/assembly.c
View file @
08cbe5d2
...
...
@@ -811,10 +811,10 @@ HRESULT assembly_get_version(ASSEMBLY *assembly, LPWSTR *version)
return
S_OK
;
}
BYTE
assembly_get_architecture
(
ASSEMBLY
*
assembly
)
PEKIND
assembly_get_architecture
(
ASSEMBLY
*
assembly
)
{
if
((
assembly
->
corhdr
->
MajorRuntimeVersion
==
2
)
&&
(
assembly
->
corhdr
->
MinorRuntimeVersion
==
0
))
return
0
;
/* .NET 1.x assembly */
return
peNone
;
/* .NET 1.x assembly */
if
(
assembly
->
nthdr
->
OptionalHeader
.
Magic
==
IMAGE_NT_OPTIONAL_HDR64_MAGIC
)
return
peAMD64
;
/* AMD64/IA64 assembly */
...
...
dlls/fusion/fusionpriv.h
View file @
08cbe5d2
...
...
@@ -433,7 +433,7 @@ HRESULT assembly_release(ASSEMBLY *assembly) DECLSPEC_HIDDEN;
HRESULT
assembly_get_name
(
ASSEMBLY
*
assembly
,
LPWSTR
*
name
)
DECLSPEC_HIDDEN
;
HRESULT
assembly_get_path
(
const
ASSEMBLY
*
assembly
,
LPWSTR
*
path
)
DECLSPEC_HIDDEN
;
HRESULT
assembly_get_version
(
ASSEMBLY
*
assembly
,
LPWSTR
*
version
)
DECLSPEC_HIDDEN
;
BYTE
assembly_get_architecture
(
ASSEMBLY
*
assembly
)
DECLSPEC_HIDDEN
;
PEKIND
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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment