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
5b6bb63a
Commit
5b6bb63a
authored
Jul 31, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Load dll from the directory containing the manifest for local assemblies.
parent
a1a8036b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
1 deletion
+25
-1
loader.c
dlls/ntdll/loader.c
+25
-1
No files found.
dlls/ntdll/loader.c
View file @
5b6bb63a
...
...
@@ -1592,6 +1592,7 @@ static NTSTATUS load_builtin_dll( LPCWSTR load_path, LPCWSTR path, HANDLE file,
static
NTSTATUS
find_actctx_dll
(
LPCWSTR
libname
,
LPWSTR
*
fullname
)
{
static
const
WCHAR
winsxsW
[]
=
{
'\\'
,
'w'
,
'i'
,
'n'
,
's'
,
'x'
,
's'
,
'\\'
};
static
const
WCHAR
dotManifestW
[]
=
{
'.'
,
'm'
,
'a'
,
'n'
,
'i'
,
'f'
,
'e'
,
's'
,
't'
,
0
};
ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION
*
info
;
ACTCTX_SECTION_KEYED_DATA
data
;
...
...
@@ -1624,6 +1625,29 @@ static NTSTATUS find_actctx_dll( LPCWSTR libname, LPWSTR *fullname )
/* restart with larger buffer */
}
if
((
p
=
strrchrW
(
info
->
lpAssemblyManifestPath
,
'\\'
)))
{
DWORD
dirlen
=
info
->
ulAssemblyDirectoryNameLength
/
sizeof
(
WCHAR
);
p
++
;
if
(
strncmpiW
(
p
,
info
->
lpAssemblyDirectoryName
,
dirlen
)
||
strcmpiW
(
p
+
dirlen
,
dotManifestW
))
{
/* manifest name does not match directory name, so it's not a global
* windows/winsxs manifest; use the manifest directory name instead */
dirlen
=
p
-
info
->
lpAssemblyManifestPath
;
needed
=
(
dirlen
+
1
)
*
sizeof
(
WCHAR
)
+
nameW
.
Length
;
if
(
!
(
*
fullname
=
p
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
needed
)))
{
status
=
STATUS_NO_MEMORY
;
goto
done
;
}
memcpy
(
p
,
info
->
lpAssemblyManifestPath
,
dirlen
*
sizeof
(
WCHAR
)
);
p
+=
dirlen
;
strcpyW
(
p
,
libname
);
goto
done
;
}
}
needed
=
(
windows_dir
.
Length
+
sizeof
(
winsxsW
)
+
info
->
ulAssemblyDirectoryNameLength
+
nameW
.
Length
+
2
*
sizeof
(
WCHAR
));
...
...
@@ -1640,7 +1664,6 @@ static NTSTATUS find_actctx_dll( LPCWSTR libname, LPWSTR *fullname )
p
+=
info
->
ulAssemblyDirectoryNameLength
/
sizeof
(
WCHAR
);
*
p
++
=
'\\'
;
strcpyW
(
p
,
libname
);
TRACE
(
"found %s for %s
\n
"
,
debugstr_w
(
*
fullname
),
debugstr_w
(
libname
)
);
done:
RtlFreeHeap
(
GetProcessHeap
(),
0
,
info
);
RtlReleaseActivationContext
(
data
.
hActCtx
);
...
...
@@ -1687,6 +1710,7 @@ static NTSTATUS find_dll_file( const WCHAR *load_path, const WCHAR *libname,
status
=
find_actctx_dll
(
libname
,
&
fullname
);
if
(
status
==
STATUS_SUCCESS
)
{
TRACE
(
"found %s for %s
\n
"
,
debugstr_w
(
fullname
),
debugstr_w
(
libname
)
);
RtlFreeHeap
(
GetProcessHeap
(),
0
,
dllname
);
libname
=
dllname
=
fullname
;
}
...
...
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