Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
842d4043
Commit
842d4043
authored
Jun 04, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fusion: Build with msvcrt.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d0416d9b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
78 additions
and
81 deletions
+78
-81
Makefile.in
dlls/fusion/Makefile.in
+2
-0
asmcache.c
dlls/fusion/asmcache.c
+20
-21
asmenum.c
dlls/fusion/asmenum.c
+26
-27
asmname.c
dlls/fusion/asmname.c
+13
-14
assembly.c
dlls/fusion/assembly.c
+4
-5
fusion.c
dlls/fusion/fusion.c
+8
-9
mscoree.c
dlls/mscoree/tests/mscoree.c
+5
-5
No files found.
dlls/fusion/Makefile.in
View file @
842d4043
MODULE
=
fusion.dll
IMPORTS
=
bcrypt dbghelp shlwapi version user32
EXTRADLLFLAGS
=
-mno-cygwin
C_SRCS
=
\
asmcache.c
\
asmenum.c
\
...
...
dlls/fusion/asmcache.c
View file @
842d4043
...
...
@@ -37,7 +37,6 @@
#include "fusionpriv.h"
#include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
fusion
);
...
...
@@ -63,11 +62,11 @@ static BOOL create_full_path(LPCWSTR path)
BOOL
ret
=
TRUE
;
int
len
;
if
(
!
(
new_path
=
heap_alloc
((
strlenW
(
path
)
+
1
)
*
sizeof
(
WCHAR
))))
return
FALSE
;
if
(
!
(
new_path
=
heap_alloc
((
l
strlenW
(
path
)
+
1
)
*
sizeof
(
WCHAR
))))
return
FALSE
;
strcpyW
(
new_path
,
path
);
l
strcpyW
(
new_path
,
path
);
while
((
len
=
strlenW
(
new_path
))
&&
new_path
[
len
-
1
]
==
'\\'
)
while
((
len
=
l
strlenW
(
new_path
))
&&
new_path
[
len
-
1
]
==
'\\'
)
new_path
[
len
-
1
]
=
0
;
while
(
!
CreateDirectoryW
(
new_path
,
NULL
))
...
...
@@ -84,7 +83,7 @@ static BOOL create_full_path(LPCWSTR path)
break
;
}
if
(
!
(
slash
=
strrchrW
(
new_path
,
'\\'
)))
if
(
!
(
slash
=
wcsrchr
(
new_path
,
'\\'
)))
{
ret
=
FALSE
;
break
;
...
...
@@ -116,14 +115,14 @@ static BOOL get_assembly_directory(LPWSTR dir, DWORD size, const char *version,
if
(
!
strcmp
(
version
,
"v4.0.30319"
))
{
strcpyW
(
dir
+
len
,
dotnet
);
l
strcpyW
(
dir
+
len
,
dotnet
);
len
+=
ARRAY_SIZE
(
dotnet
)
-
1
;
strcpyW
(
dir
+
len
,
gac
+
1
);
l
strcpyW
(
dir
+
len
,
gac
+
1
);
len
+=
ARRAY_SIZE
(
gac
)
-
2
;
}
else
{
strcpyW
(
dir
+
len
,
gac
);
l
strcpyW
(
dir
+
len
,
gac
);
len
+=
ARRAY_SIZE
(
gac
)
-
1
;
}
switch
(
architecture
)
...
...
@@ -132,15 +131,15 @@ static BOOL get_assembly_directory(LPWSTR dir, DWORD size, const char *version,
break
;
case
peMSIL
:
strcpyW
(
dir
+
len
,
msil
);
l
strcpyW
(
dir
+
len
,
msil
);
break
;
case
peI386
:
strcpyW
(
dir
+
len
,
x86
);
l
strcpyW
(
dir
+
len
,
x86
);
break
;
case
peAMD64
:
strcpyW
(
dir
+
len
,
amd64
);
l
strcpyW
(
dir
+
len
,
amd64
);
break
;
default:
...
...
@@ -267,11 +266,11 @@ static HRESULT WINAPI IAssemblyCacheImpl_UninstallAssembly(IAssemblyCache *iface
if
(
DeleteFileW
(
path
))
{
if
((
p
=
strrchrW
(
path
,
'\\'
)))
if
((
p
=
wcsrchr
(
path
,
'\\'
)))
{
*
p
=
0
;
RemoveDirectoryW
(
path
);
if
((
p
=
strrchrW
(
path
,
'\\'
)))
if
((
p
=
wcsrchr
(
path
,
'\\'
)))
{
*
p
=
0
;
RemoveDirectoryW
(
path
);
...
...
@@ -393,13 +392,13 @@ static HRESULT copy_file( const WCHAR *src_dir, DWORD src_len, const WCHAR *dst_
const
WCHAR
*
filename
)
{
WCHAR
*
src_file
,
*
dst_file
;
DWORD
len
=
strlenW
(
filename
);
DWORD
len
=
l
strlenW
(
filename
);
HRESULT
hr
=
S_OK
;
if
(
!
(
src_file
=
heap_alloc
(
(
src_len
+
len
+
1
)
*
sizeof
(
WCHAR
)
)))
return
E_OUTOFMEMORY
;
memcpy
(
src_file
,
src_dir
,
src_len
*
sizeof
(
WCHAR
)
);
strcpyW
(
src_file
+
src_len
,
filename
);
l
strcpyW
(
src_file
+
src_len
,
filename
);
if
(
!
(
dst_file
=
heap_alloc
(
(
dst_len
+
len
+
1
)
*
sizeof
(
WCHAR
)
)))
{
...
...
@@ -407,7 +406,7 @@ static HRESULT copy_file( const WCHAR *src_dir, DWORD src_len, const WCHAR *dst_
return
E_OUTOFMEMORY
;
}
memcpy
(
dst_file
,
dst_dir
,
dst_len
*
sizeof
(
WCHAR
)
);
strcpyW
(
dst_file
+
dst_len
,
filename
);
l
strcpyW
(
dst_file
+
dst_len
,
filename
);
if
(
!
CopyFileW
(
src_file
,
dst_file
,
FALSE
))
hr
=
HRESULT_FROM_WIN32
(
GetLastError
()
);
heap_free
(
src_file
);
...
...
@@ -442,7 +441,7 @@ static HRESULT WINAPI IAssemblyCacheImpl_InstallAssembly(IAssemblyCache *iface,
if
(
!
pszManifestFilePath
||
!*
pszManifestFilePath
)
return
E_INVALIDARG
;
if
(
!
(
extension
=
strrchrW
(
pszManifestFilePath
,
'.'
)))
if
(
!
(
extension
=
wcsrchr
(
pszManifestFilePath
,
'.'
)))
return
HRESULT_FROM_WIN32
(
ERROR_INVALID_NAME
);
if
(
lstrcmpiW
(
extension
,
ext_exe
)
&&
lstrcmpiW
(
extension
,
ext_dll
))
...
...
@@ -483,16 +482,16 @@ static HRESULT WINAPI IAssemblyCacheImpl_InstallAssembly(IAssemblyCache *iface,
architecture
=
assembly_get_architecture
(
assembly
);
get_assembly_directory
(
asmdir
,
MAX_PATH
,
clr_version
,
architecture
);
dst_len
+=
strlenW
(
asmdir
)
+
strlenW
(
name
)
+
strlenW
(
version
)
+
strlenW
(
token
);
dst_len
+=
lstrlenW
(
asmdir
)
+
lstrlenW
(
name
)
+
lstrlenW
(
version
)
+
l
strlenW
(
token
);
if
(
!
(
dst_dir
=
heap_alloc
(
dst_len
*
sizeof
(
WCHAR
))))
{
hr
=
E_OUTOFMEMORY
;
goto
done
;
}
if
(
!
strcmp
(
clr_version
,
"v4.0.30319"
))
dst_len
=
s
printfW
(
dst_dir
,
format_v40
,
asmdir
,
name
,
version
,
token
);
dst_len
=
s
wprintf
(
dst_dir
,
dst_len
,
format_v40
,
asmdir
,
name
,
version
,
token
);
else
dst_len
=
s
printfW
(
dst_dir
,
format
,
asmdir
,
name
,
version
,
token
);
dst_len
=
s
wprintf
(
dst_dir
,
dst_len
,
format
,
asmdir
,
name
,
version
,
token
);
create_full_path
(
dst_dir
);
...
...
@@ -500,7 +499,7 @@ static HRESULT WINAPI IAssemblyCacheImpl_InstallAssembly(IAssemblyCache *iface,
if
(
FAILED
(
hr
))
goto
done
;
if
((
p
=
strrchrW
(
asmpath
,
'\\'
)))
if
((
p
=
wcsrchr
(
asmpath
,
'\\'
)))
{
filename
=
p
+
1
;
src_dir
=
asmpath
;
...
...
dlls/fusion/asmenum.c
View file @
842d4043
...
...
@@ -34,7 +34,6 @@
#include "fusionpriv.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "wine/list.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
fusion
);
...
...
@@ -187,9 +186,9 @@ static void build_file_mask(IAssemblyName *name, int depth, const WCHAR *path,
if
(
!
name
)
{
if
(
prefix
&&
depth
==
1
)
s
printfW
(
buf
,
star_prefix_fmt
,
path
,
prefix
);
s
wprintf
(
buf
,
MAX_PATH
,
star_prefix_fmt
,
path
,
prefix
);
else
s
printfW
(
buf
,
star_fmt
,
path
);
s
wprintf
(
buf
,
MAX_PATH
,
star_fmt
,
path
);
return
;
}
if
(
depth
==
0
)
...
...
@@ -198,9 +197,9 @@ static void build_file_mask(IAssemblyName *name, int depth, const WCHAR *path,
*
disp
=
'\0'
;
hr
=
IAssemblyName_GetName
(
name
,
&
size
,
disp
);
if
(
SUCCEEDED
(
hr
))
s
printfW
(
buf
,
ss_fmt
,
path
,
disp
);
s
wprintf
(
buf
,
MAX_PATH
,
ss_fmt
,
path
,
disp
);
else
s
printfW
(
buf
,
ss_fmt
,
path
,
star
);
s
wprintf
(
buf
,
MAX_PATH
,
ss_fmt
,
path
,
star
);
}
else
if
(
depth
==
1
)
{
...
...
@@ -219,7 +218,7 @@ static void build_file_mask(IAssemblyName *name, int depth, const WCHAR *path,
if
(
!
major_size
||
!
minor_size
||
!
build_size
||
!
revision_size
)
verptr
=
star
;
else
{
s
printfW
(
version
,
ver_fmt
,
major
,
minor
,
build
,
revision
);
s
wprintf
(
version
,
ARRAY_SIZE
(
version
)
,
ver_fmt
,
major
,
minor
,
build
,
revision
);
verptr
=
version
;
}
...
...
@@ -234,9 +233,9 @@ static void build_file_mask(IAssemblyName *name, int depth, const WCHAR *path,
}
if
(
prefix
)
s
printfW
(
buf
,
ssss_fmt
,
path
,
prefix
,
verptr
,
pubkeyptr
);
s
wprintf
(
buf
,
MAX_PATH
,
ssss_fmt
,
path
,
prefix
,
verptr
,
pubkeyptr
);
else
s
printfW
(
buf
,
sss_fmt
,
path
,
verptr
,
pubkeyptr
);
s
wprintf
(
buf
,
MAX_PATH
,
sss_fmt
,
path
,
verptr
,
pubkeyptr
);
}
}
...
...
@@ -254,7 +253,7 @@ static int compare_assembly_names(ASMNAME *asmname1, ASMNAME *asmname2)
size
=
sizeof
(
name2
);
IAssemblyName_GetProperty
(
asmname2
->
name
,
ASM_NAME_NAME
,
name2
,
&
size
);
if
((
ret
=
strcmpiW
(
name1
,
name2
)))
return
ret
;
if
((
ret
=
wcsicmp
(
name1
,
name2
)))
return
ret
;
for
(
i
=
ASM_NAME_MAJOR_VERSION
;
i
<
ASM_NAME_CULTURE
;
i
++
)
{
...
...
@@ -277,7 +276,7 @@ static int compare_assembly_names(ASMNAME *asmname1, ASMNAME *asmname2)
token_to_str
(
token1
,
token_str1
);
token_to_str
(
token2
,
token_str2
);
if
((
ret
=
strcmpiW
(
token_str1
,
token_str2
)))
return
ret
;
if
((
ret
=
wcsicmp
(
token_str1
,
token_str2
)))
return
ret
;
return
0
;
}
...
...
@@ -331,7 +330,7 @@ static HRESULT enum_gac_assemblies(struct list *assemblies, IAssemblyName *name,
if
(
depth
==
0
)
{
if
(
name
)
ptr
=
strrchrW
(
buf
,
'\\'
)
+
1
;
ptr
=
wcsrchr
(
buf
,
'\\'
)
+
1
;
else
ptr
=
ffd
.
cFileName
;
...
...
@@ -341,19 +340,19 @@ static HRESULT enum_gac_assemblies(struct list *assemblies, IAssemblyName *name,
{
const
WCHAR
*
token
,
*
version
=
ffd
.
cFileName
;
s
printfW
(
asmpath
,
path_fmt
,
path
,
ffd
.
cFileName
,
parent
);
ptr
=
strstrW
(
ffd
.
cFileName
,
dblunder
);
s
wprintf
(
asmpath
,
ARRAY_SIZE
(
asmpath
)
,
path_fmt
,
path
,
ffd
.
cFileName
,
parent
);
ptr
=
wcsstr
(
ffd
.
cFileName
,
dblunder
);
*
ptr
=
'\0'
;
token
=
ptr
+
2
;
if
(
prefix
)
{
unsigned
int
prefix_len
=
strlenW
(
prefix
);
if
(
strlenW
(
ffd
.
cFileName
)
>=
prefix_len
&&
!
strncmpiW
(
ffd
.
cFileName
,
prefix
,
prefix_len
))
unsigned
int
prefix_len
=
l
strlenW
(
prefix
);
if
(
l
strlenW
(
ffd
.
cFileName
)
>=
prefix_len
&&
!
wcsnicmp
(
ffd
.
cFileName
,
prefix
,
prefix_len
))
version
+=
prefix_len
;
}
s
printfW
(
disp
,
name_fmt
,
parent
,
version
,
token
);
s
wprintf
(
disp
,
ARRAY_SIZE
(
disp
)
,
name_fmt
,
parent
,
version
,
token
);
if
(
!
(
asmname
=
heap_alloc
(
sizeof
(
*
asmname
))))
{
...
...
@@ -381,7 +380,7 @@ static HRESULT enum_gac_assemblies(struct list *assemblies, IAssemblyName *name,
continue
;
}
s
printfW
(
buf
,
ss_fmt
,
path
,
ffd
.
cFileName
);
s
wprintf
(
buf
,
ARRAY_SIZE
(
buf
)
,
ss_fmt
,
path
,
ffd
.
cFileName
);
hr
=
enum_gac_assemblies
(
assemblies
,
name
,
depth
+
1
,
prefix
,
buf
);
if
(
FAILED
(
hr
))
break
;
...
...
@@ -408,21 +407,21 @@ static HRESULT enumerate_gac(IAssemblyEnumImpl *asmenum, IAssemblyName *pName)
if
(
FAILED
(
hr
))
return
hr
;
strcpyW
(
path
,
buf
);
l
strcpyW
(
path
,
buf
);
GetNativeSystemInfo
(
&
info
);
if
(
info
.
u
.
s
.
wProcessorArchitecture
==
PROCESSOR_ARCHITECTURE_AMD64
)
{
strcpyW
(
path
+
size
-
1
,
gac_64
);
l
strcpyW
(
path
+
size
-
1
,
gac_64
);
hr
=
enum_gac_assemblies
(
&
asmenum
->
assemblies
,
pName
,
0
,
v40
,
path
);
if
(
FAILED
(
hr
))
return
hr
;
}
strcpyW
(
path
+
size
-
1
,
gac_32
);
l
strcpyW
(
path
+
size
-
1
,
gac_32
);
hr
=
enum_gac_assemblies
(
&
asmenum
->
assemblies
,
pName
,
0
,
v40
,
path
);
if
(
FAILED
(
hr
))
return
hr
;
strcpyW
(
path
+
size
-
1
,
gac_msil
);
l
strcpyW
(
path
+
size
-
1
,
gac_msil
);
hr
=
enum_gac_assemblies
(
&
asmenum
->
assemblies
,
pName
,
0
,
v40
,
path
);
if
(
FAILED
(
hr
))
return
hr
;
...
...
@@ -432,25 +431,25 @@ static HRESULT enumerate_gac(IAssemblyEnumImpl *asmenum, IAssemblyName *pName)
if
(
FAILED
(
hr
))
return
hr
;
strcpyW
(
path
,
buf
);
l
strcpyW
(
path
,
buf
);
if
(
info
.
u
.
s
.
wProcessorArchitecture
==
PROCESSOR_ARCHITECTURE_AMD64
)
{
strcpyW
(
path
+
size
-
1
,
gac_64
);
l
strcpyW
(
path
+
size
-
1
,
gac_64
);
hr
=
enum_gac_assemblies
(
&
asmenum
->
assemblies
,
pName
,
0
,
NULL
,
path
);
if
(
FAILED
(
hr
))
return
hr
;
}
strcpyW
(
path
+
size
-
1
,
gac_32
);
l
strcpyW
(
path
+
size
-
1
,
gac_32
);
hr
=
enum_gac_assemblies
(
&
asmenum
->
assemblies
,
pName
,
0
,
NULL
,
path
);
if
(
FAILED
(
hr
))
return
hr
;
strcpyW
(
path
+
size
-
1
,
gac_msil
);
l
strcpyW
(
path
+
size
-
1
,
gac_msil
);
hr
=
enum_gac_assemblies
(
&
asmenum
->
assemblies
,
pName
,
0
,
NULL
,
path
);
if
(
FAILED
(
hr
))
return
hr
;
strcpyW
(
path
+
size
-
1
,
gac
);
l
strcpyW
(
path
+
size
-
1
,
gac
);
hr
=
enum_gac_assemblies
(
&
asmenum
->
assemblies
,
pName
,
0
,
NULL
,
path
);
if
(
FAILED
(
hr
))
return
hr
;
...
...
dlls/fusion/asmname.c
View file @
842d4043
...
...
@@ -34,7 +34,6 @@
#include "strsafe.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "fusionpriv.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
fusion
);
...
...
@@ -277,7 +276,7 @@ static HRESULT WINAPI IAssemblyNameImpl_GetDisplayName(IAssemblyName *iface,
if
(
!
name
->
displayname
||
!*
name
->
displayname
)
return
FUSION_E_INVALID_NAME
;
size
=
strlenW
(
name
->
displayname
)
+
1
;
size
=
l
strlenW
(
name
->
displayname
)
+
1
;
if
(
*
pccDisplayName
<
size
)
{
...
...
@@ -285,7 +284,7 @@ static HRESULT WINAPI IAssemblyNameImpl_GetDisplayName(IAssemblyName *iface,
return
E_NOT_SUFFICIENT_BUFFER
;
}
if
(
szDisplayName
)
strcpyW
(
szDisplayName
,
name
->
displayname
);
if
(
szDisplayName
)
l
strcpyW
(
szDisplayName
,
name
->
displayname
);
*
pccDisplayName
=
size
;
return
S_OK
;
...
...
@@ -417,7 +416,7 @@ static HRESULT WINAPI IAssemblyNameImpl_GetName(IAssemblyName *iface,
TRACE
(
"(%p, %p, %p)
\n
"
,
iface
,
lpcwBuffer
,
pwzName
);
if
(
name
->
name
)
len
=
strlenW
(
name
->
name
)
+
1
;
len
=
l
strlenW
(
name
->
name
)
+
1
;
else
len
=
0
;
...
...
@@ -427,7 +426,7 @@ static HRESULT WINAPI IAssemblyNameImpl_GetName(IAssemblyName *iface,
return
E_NOT_SUFFICIENT_BUFFER
;
}
if
(
!
name
->
name
)
lpcwBuffer
[
0
]
=
0
;
else
strcpyW
(
pwzName
,
name
->
name
);
else
l
strcpyW
(
pwzName
,
name
->
name
);
*
lpcwBuffer
=
len
;
return
S_OK
;
...
...
@@ -465,7 +464,7 @@ static HRESULT WINAPI IAssemblyNameImpl_IsEqual(IAssemblyName *iface,
if
(
!
pName
)
return
S_FALSE
;
if
(
flags
&
~
ASM_CMPF_IL_ALL
)
FIXME
(
"unsupported flags
\n
"
);
if
((
flags
&
ASM_CMPF_NAME
)
&&
strcmpW
(
name1
->
name
,
name2
->
name
))
return
S_FALSE
;
if
((
flags
&
ASM_CMPF_NAME
)
&&
l
strcmpW
(
name1
->
name
,
name2
->
name
))
return
S_FALSE
;
if
(
name1
->
versize
&&
name2
->
versize
)
{
if
((
flags
&
ASM_CMPF_MAJOR_VERSION
)
&&
...
...
@@ -483,7 +482,7 @@ static HRESULT WINAPI IAssemblyNameImpl_IsEqual(IAssemblyName *iface,
if
((
flags
&
ASM_CMPF_CULTURE
)
&&
name1
->
culture
&&
name2
->
culture
&&
strcmpW
(
name1
->
culture
,
name2
->
culture
))
return
S_FALSE
;
l
strcmpW
(
name1
->
culture
,
name2
->
culture
))
return
S_FALSE
;
return
S_OK
;
}
...
...
@@ -560,10 +559,10 @@ static HRESULT parse_version(IAssemblyNameImpl *name, LPWSTR version)
if
(
!*
beg
)
return
S_OK
;
end
=
strchrW
(
beg
,
'.'
);
end
=
wcschr
(
beg
,
'.'
);
if
(
end
)
*
end
=
'\0'
;
name
->
version
[
i
]
=
atolW
(
beg
);
name
->
version
[
i
]
=
wcstol
(
beg
,
NULL
,
10
);
name
->
versize
++
;
if
(
!
end
&&
i
<
3
)
...
...
@@ -700,11 +699,11 @@ static HRESULT parse_display_name(IAssemblyNameImpl *name, LPCWSTR szAssemblyNam
goto
done
;
}
ptr
=
strchrW
(
str
,
','
);
ptr
=
wcschr
(
str
,
','
);
if
(
ptr
)
*
ptr
=
'\0'
;
/* no ',' but ' ' only */
if
(
!
ptr
&&
strchrW
(
str
,
' '
)
)
if
(
!
ptr
&&
wcschr
(
str
,
' '
)
)
{
hr
=
FUSION_E_INVALID_NAME
;
goto
done
;
...
...
@@ -723,7 +722,7 @@ static HRESULT parse_display_name(IAssemblyNameImpl *name, LPCWSTR szAssemblyNam
str
=
ptr
+
1
;
while
(
!
done
)
{
ptr
=
strchrW
(
str
,
'='
);
ptr
=
wcschr
(
str
,
'='
);
if
(
!
ptr
)
{
hr
=
FUSION_E_INVALID_NAME
;
...
...
@@ -737,9 +736,9 @@ static HRESULT parse_display_name(IAssemblyNameImpl *name, LPCWSTR szAssemblyNam
goto
done
;
}
if
(
!
(
ptr2
=
strchrW
(
ptr
,
','
)))
if
(
!
(
ptr2
=
wcschr
(
ptr
,
','
)))
{
if
(
!
(
ptr2
=
strchrW
(
ptr
,
'\0'
)))
if
(
!
(
ptr2
=
wcschr
(
ptr
,
'\0'
)))
{
hr
=
FUSION_E_INVALID_NAME
;
goto
done
;
...
...
dlls/fusion/assembly.c
View file @
842d4043
...
...
@@ -35,7 +35,6 @@
#include "fusionpriv.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#define TableFromToken(tk) (TypeFromToken(tk) >> 24)
#define TokenFromTable(idx) (idx << 24)
...
...
@@ -750,10 +749,10 @@ HRESULT assembly_get_name(ASSEMBLY *assembly, LPWSTR *name)
HRESULT
assembly_get_path
(
const
ASSEMBLY
*
assembly
,
LPWSTR
*
path
)
{
WCHAR
*
cpy
=
heap_alloc
((
strlenW
(
assembly
->
path
)
+
1
)
*
sizeof
(
WCHAR
));
WCHAR
*
cpy
=
heap_alloc
((
l
strlenW
(
assembly
->
path
)
+
1
)
*
sizeof
(
WCHAR
));
*
path
=
cpy
;
if
(
cpy
)
strcpyW
(
cpy
,
assembly
->
path
);
l
strcpyW
(
cpy
,
assembly
->
path
);
else
return
E_OUTOFMEMORY
;
...
...
@@ -777,10 +776,10 @@ HRESULT assembly_get_version(ASSEMBLY *assembly, LPWSTR *version)
if
(
!
asmtbl
)
return
E_FAIL
;
if
(
!
(
*
version
=
heap_alloc
(
sizeof
(
format
)
+
4
*
strlen
(
"65535"
)
*
sizeof
(
WCHAR
))))
if
(
!
(
*
version
=
heap_alloc
(
24
*
sizeof
(
WCHAR
))))
return
E_OUTOFMEMORY
;
s
printfW
(
*
version
,
format
,
asmtbl
->
MajorVersion
,
asmtbl
->
MinorVersion
,
s
wprintf
(
*
version
,
24
,
format
,
asmtbl
->
MajorVersion
,
asmtbl
->
MinorVersion
,
asmtbl
->
BuildNumber
,
asmtbl
->
RevisionNumber
);
return
S_OK
;
...
...
dlls/fusion/fusion.c
View file @
842d4043
...
...
@@ -28,7 +28,6 @@
#include "ole2.h"
#include "fusion.h"
#include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
fusion
);
...
...
@@ -128,7 +127,7 @@ HRESULT WINAPI GetCachePath(ASM_CACHE_FLAGS dwCacheFlags, LPWSTR pwzCachePath,
return
E_INVALIDARG
;
len
=
GetWindowsDirectoryW
(
windir
,
MAX_PATH
);
strcpyW
(
path
,
windir
);
l
strcpyW
(
path
,
windir
);
switch
(
dwCacheFlags
)
{
...
...
@@ -138,14 +137,14 @@ HRESULT WINAPI GetCachePath(ASM_CACHE_FLAGS dwCacheFlags, LPWSTR pwzCachePath,
if
(
FAILED
(
hr
))
return
hr
;
len
=
s
printfW
(
path
,
zapfmt
,
windir
,
assembly
+
1
,
nativeimg
,
version
);
len
=
s
wprintf
(
path
,
ARRAY_SIZE
(
path
)
,
zapfmt
,
windir
,
assembly
+
1
,
nativeimg
,
version
);
break
;
}
case
ASM_CACHE_GAC
:
{
strcpyW
(
path
+
len
,
assembly
);
l
strcpyW
(
path
+
len
,
assembly
);
len
+=
ARRAY_SIZE
(
assembly
)
-
1
;
strcpyW
(
path
+
len
,
gac
);
l
strcpyW
(
path
+
len
,
gac
);
len
+=
ARRAY_SIZE
(
gac
)
-
1
;
break
;
}
...
...
@@ -155,13 +154,13 @@ HRESULT WINAPI GetCachePath(ASM_CACHE_FLAGS dwCacheFlags, LPWSTR pwzCachePath,
return
E_FAIL
;
}
case
ASM_CACHE_ROOT
:
strcpyW
(
path
+
len
,
assembly
);
l
strcpyW
(
path
+
len
,
assembly
);
len
+=
ARRAY_SIZE
(
assembly
)
-
1
;
break
;
case
ASM_CACHE_ROOT_EX
:
strcpyW
(
path
+
len
,
dotnet
);
l
strcpyW
(
path
+
len
,
dotnet
);
len
+=
ARRAY_SIZE
(
dotnet
)
-
1
;
strcpyW
(
path
+
len
,
assembly
);
l
strcpyW
(
path
+
len
,
assembly
);
len
+=
ARRAY_SIZE
(
assembly
)
-
1
;
break
;
default:
...
...
@@ -172,7 +171,7 @@ HRESULT WINAPI GetCachePath(ASM_CACHE_FLAGS dwCacheFlags, LPWSTR pwzCachePath,
if
(
*
pcchPath
<=
len
||
!
pwzCachePath
)
hr
=
E_NOT_SUFFICIENT_BUFFER
;
else
if
(
pwzCachePath
)
strcpyW
(
pwzCachePath
,
path
);
l
strcpyW
(
pwzCachePath
,
path
);
*
pcchPath
=
len
;
return
hr
;
...
...
dlls/mscoree/tests/mscoree.c
View file @
842d4043
...
...
@@ -325,7 +325,7 @@ static void test_loadlibraryshim(void)
GetModuleFileNameA
(
hdll
,
dllpath
,
MAX_PATH
);
todo_wine
ok
(
StrStrIA
(
dllpath
,
"v1.1.4322"
)
!=
0
,
"incorrect fusion.dll path %s
\n
"
,
dllpath
);
ok
(
StrStrIA
(
dllpath
,
"v1.1.4322"
)
!=
0
,
"incorrect fusion.dll path %s
\n
"
,
dllpath
);
ok
(
StrStrIA
(
dllpath
,
"fusion.dll"
)
!=
0
,
"incorrect fusion.dll path %s
\n
"
,
dllpath
);
FreeLibrary
(
hdll
);
...
...
@@ -339,7 +339,7 @@ static void test_loadlibraryshim(void)
GetModuleFileNameA
(
hdll
,
dllpath
,
MAX_PATH
);
todo_wine
ok
(
StrStrIA
(
dllpath
,
"v2.0.50727"
)
!=
0
,
"incorrect fusion.dll path %s
\n
"
,
dllpath
);
ok
(
StrStrIA
(
dllpath
,
"v2.0.50727"
)
!=
0
,
"incorrect fusion.dll path %s
\n
"
,
dllpath
);
ok
(
StrStrIA
(
dllpath
,
"fusion.dll"
)
!=
0
,
"incorrect fusion.dll path %s
\n
"
,
dllpath
);
FreeLibrary
(
hdll
);
...
...
@@ -355,7 +355,7 @@ static void test_loadlibraryshim(void)
GetModuleFileNameA
(
hdll
,
dllpath
,
MAX_PATH
);
todo_wine
ok
(
StrStrIA
(
dllpath
,
"v4.0.30319"
)
!=
0
,
"incorrect fusion.dll path %s
\n
"
,
dllpath
);
ok
(
StrStrIA
(
dllpath
,
"v4.0.30319"
)
!=
0
,
"incorrect fusion.dll path %s
\n
"
,
dllpath
);
ok
(
StrStrIA
(
dllpath
,
"fusion.dll"
)
!=
0
,
"incorrect fusion.dll path %s
\n
"
,
dllpath
);
FreeLibrary
(
hdll
);
...
...
@@ -375,7 +375,7 @@ static void test_loadlibraryshim(void)
GetModuleFileNameA
(
hdll
,
dllpath
,
MAX_PATH
);
if
(
latest
)
todo_wine
ok
(
StrStrIA
(
dllpath
,
latestA
)
!=
0
,
"incorrect fusion.dll path %s
\n
"
,
dllpath
);
ok
(
StrStrIA
(
dllpath
,
latestA
)
!=
0
,
"incorrect fusion.dll path %s
\n
"
,
dllpath
);
ok
(
StrStrIA
(
dllpath
,
"fusion.dll"
)
!=
0
,
"incorrect fusion.dll path %s
\n
"
,
dllpath
);
FreeLibrary
(
hdll
);
...
...
@@ -388,7 +388,7 @@ static void test_loadlibraryshim(void)
GetModuleFileNameA
(
hdll
,
dllpath
,
MAX_PATH
);
if
(
latest
)
todo_wine
ok
(
StrStrIA
(
dllpath
,
latestA
)
!=
0
,
"incorrect fusion.dll path %s
\n
"
,
dllpath
);
ok
(
StrStrIA
(
dllpath
,
latestA
)
!=
0
,
"incorrect fusion.dll path %s
\n
"
,
dllpath
);
ok
(
StrStrIA
(
dllpath
,
"fusion.dll"
)
!=
0
,
"incorrect fusion.dll path %s
\n
"
,
dllpath
);
FreeLibrary
(
hdll
);
...
...
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