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
f408fa83
Commit
f408fa83
authored
12 years ago
by
Hans Leidekker
Committed by
Alexandre Julliard
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fusion: Add support for ASM_CACHE_ROOT_EX in GetCachePath.
parent
08cbe5d2
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/fusion/fusion.c
+25
-26
25 additions, 26 deletions
dlls/fusion/fusion.c
include/fusion.idl
+2
-1
2 additions, 1 deletion
include/fusion.idl
with
27 additions
and
27 deletions
dlls/fusion/fusion.c
+
25
−
26
View file @
f408fa83
...
...
@@ -90,32 +90,26 @@ static HRESULT get_corversion(LPWSTR version, DWORD size)
HRESULT
WINAPI
GetCachePath
(
ASM_CACHE_FLAGS
dwCacheFlags
,
LPWSTR
pwzCachePath
,
PDWORD
pcchPath
)
{
WCHAR
path
[
MAX_PATH
];
WCHAR
windir
[
MAX_PATH
];
WCHAR
version
[
MAX_PATH
];
DWORD
len
;
HRESULT
hr
=
S_OK
;
static
const
WCHAR
backslash
[]
=
{
'\\'
,
0
};
static
const
WCHAR
assembly
[]
=
{
'a'
,
's'
,
's'
,
'e'
,
'm'
,
'b'
,
'l'
,
'y'
,
0
};
static
const
WCHAR
gac
[]
=
{
'G'
,
'A'
,
'C'
,
0
};
static
const
WCHAR
nativeimg
[]
=
{
'N'
,
'a'
,
't'
,
'i'
,
'v'
,
'e'
,
'I'
,
'm'
,
'a'
,
'g'
,
'e'
,
's'
,
'_'
,
0
};
static
const
WCHAR
assembly
[]
=
{
'\\'
,
'a'
,
's'
,
's'
,
'e'
,
'm'
,
'b'
,
'l'
,
'y'
,
0
};
static
const
WCHAR
gac
[]
=
{
'\\'
,
'G'
,
'A'
,
'C'
,
0
};
static
const
WCHAR
nativeimg
[]
=
{
'N'
,
'a'
,
't'
,
'i'
,
'v'
,
'e'
,
'I'
,
'm'
,
'a'
,
'g'
,
'e'
,
's'
,
'_'
,
0
};
static
const
WCHAR
dotnet
[]
=
{
'\\'
,
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'.'
,
'N'
,
'E'
,
'T'
,
0
};
#ifdef _WIN64
static
const
WCHAR
zapfmt
[]
=
{
'%'
,
's'
,
'\\'
,
'%'
,
's'
,
'\\'
,
'%'
,
's'
,
'%'
,
's'
,
'_'
,
'6'
,
'4'
,
0
};
#else
static
const
WCHAR
zapfmt
[]
=
{
'%'
,
's'
,
'\\'
,
'%'
,
's'
,
'\\'
,
'%'
,
's'
,
'%'
,
's'
,
'_'
,
'3'
,
'2'
,
0
};
#endif
WCHAR
path
[
MAX_PATH
],
windir
[
MAX_PATH
],
version
[
MAX_PATH
];
DWORD
len
;
HRESULT
hr
=
S_OK
;
TRACE
(
"(%08x, %p, %p)
\n
"
,
dwCacheFlags
,
pwzCachePath
,
pcchPath
);
if
(
!
pcchPath
)
return
E_INVALIDARG
;
GetWindowsDirectoryW
(
windir
,
MAX_PATH
);
lstrcpyW
(
path
,
windir
);
lstrcatW
(
path
,
backslash
);
lstrcatW
(
path
,
assembly
);
len
=
GetWindowsDirectoryW
(
windir
,
MAX_PATH
);
strcpyW
(
path
,
windir
);
switch
(
dwCacheFlags
)
{
...
...
@@ -125,37 +119,42 @@ HRESULT WINAPI GetCachePath(ASM_CACHE_FLAGS dwCacheFlags, LPWSTR pwzCachePath,
if
(
FAILED
(
hr
))
return
hr
;
sprintfW
(
path
,
zapfmt
,
windir
,
assembly
,
nativeimg
,
version
);
len
=
sprintfW
(
path
,
zapfmt
,
windir
,
assembly
+
1
,
nativeimg
,
version
);
break
;
}
case
ASM_CACHE_GAC
:
{
lstrcatW
(
path
,
backslash
);
lstrcatW
(
path
,
gac
);
strcpyW
(
path
+
len
,
assembly
);
len
+=
sizeof
(
assembly
)
/
sizeof
(
WCHAR
)
-
1
;
strcpyW
(
path
+
len
,
gac
);
len
+=
sizeof
(
gac
)
/
sizeof
(
WCHAR
)
-
1
;
break
;
}
case
ASM_CACHE_DOWNLOAD
:
{
FIXME
(
"Download cache not implemented
\n
"
);
return
E_FAIL
;
}
case
ASM_CACHE_ROOT
:
break
;
/* already set */
strcpyW
(
path
+
len
,
assembly
);
len
+=
sizeof
(
assembly
)
/
sizeof
(
WCHAR
)
-
1
;
break
;
case
ASM_CACHE_ROOT_EX
:
strcpyW
(
path
+
len
,
dotnet
);
len
+=
sizeof
(
dotnet
)
/
sizeof
(
WCHAR
)
-
1
;
strcpyW
(
path
+
len
,
assembly
);
len
+=
sizeof
(
assembly
)
/
sizeof
(
WCHAR
)
-
1
;
break
;
default:
return
E_INVALIDARG
;
}
len
=
lstrlenW
(
path
)
+
1
;
len
++
;
if
(
*
pcchPath
<=
len
||
!
pwzCachePath
)
hr
=
HRESULT_FROM_WIN32
(
ERROR_INSUFFICIENT_BUFFER
);
else
if
(
pwzCachePath
)
l
strcpyW
(
pwzCachePath
,
path
);
strcpyW
(
pwzCachePath
,
path
);
*
pcchPath
=
len
;
return
hr
;
}
This diff is collapsed.
Click to expand it.
include/fusion.idl
+
2
−
1
View file @
f408fa83
...
...
@@ -28,7 +28,8 @@ typedef enum
ASM_CACHE_ZAP
=
0
x1
,
ASM_CACHE_GAC
=
0
x2
,
ASM_CACHE_DOWNLOAD
=
0
x4
,
ASM_CACHE_ROOT
=
0
x8
ASM_CACHE_ROOT
=
0
x8
,
ASM_CACHE_ROOT_EX
=
0
x80
}
ASM_CACHE_FLAGS
;
typedef
enum
...
...
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