Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
08cbe5d2
Commit
08cbe5d2
authored
12 years ago
by
Hans Leidekker
Committed by
Alexandre Julliard
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fusion: Use the PEKIND type where appropriate.
parent
2ed8056a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/fusion/asmcache.c
+11
-2
11 additions, 2 deletions
dlls/fusion/asmcache.c
dlls/fusion/assembly.c
+2
-2
2 additions, 2 deletions
dlls/fusion/assembly.c
dlls/fusion/fusionpriv.h
+1
-1
1 addition, 1 deletion
dlls/fusion/fusionpriv.h
with
14 additions
and
5 deletions
dlls/fusion/asmcache.c
+
11
−
2
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
);
...
...
This diff is collapsed.
Click to expand it.
dlls/fusion/assembly.c
+
2
−
2
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 */
...
...
This diff is collapsed.
Click to expand it.
dlls/fusion/fusionpriv.h
+
1
−
1
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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment