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
f4024eaa
Commit
f4024eaa
authored
Jun 16, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Fetch the windows directory from the shared user data.
parent
155e4fb6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
14 deletions
+14
-14
actctx.c
dlls/ntdll/actctx.c
+5
-3
directory.c
dlls/ntdll/directory.c
+4
-5
loader.c
dlls/ntdll/loader.c
+5
-5
ntdll_misc.h
dlls/ntdll/ntdll_misc.h
+0
-1
No files found.
dlls/ntdll/actctx.c
View file @
f4024eaa
...
...
@@ -32,6 +32,7 @@
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "winternl.h"
#include "ddk/wdm.h"
#include "ntdll_misc.h"
#include "wine/exception.h"
#include "wine/debug.h"
...
...
@@ -1877,11 +1878,12 @@ static NTSTATUS lookup_winsxs(struct actctx_loader* acl, struct assembly_identit
if
(
!
ai
->
arch
||
!
ai
->
name
||
!
ai
->
public_key
)
return
STATUS_NO_SUCH_FILE
;
if
(
!
(
path
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
windows_dir
.
Length
+
sizeof
(
manifest_dirW
)
)))
if
(
!
(
path
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
sizeof
(
manifest_dirW
)
+
strlenW
(
user_shared_data
->
NtSystemRoot
)
*
sizeof
(
WCHAR
)
)))
return
STATUS_NO_MEMORY
;
memcpy
(
path
,
windows_dir
.
Buffer
,
windows_dir
.
Length
);
memcpy
(
path
+
windows_dir
.
Length
/
sizeof
(
WCHAR
),
manifest_dirW
,
sizeof
(
manifest_dirW
)
);
strcpyW
(
path
,
user_shared_data
->
NtSystemRoot
);
memcpy
(
path
+
strlenW
(
path
),
manifest_dirW
,
sizeof
(
manifest_dirW
)
);
if
(
!
RtlDosPathNameToNtPathName_U
(
path
,
&
path_us
,
NULL
,
NULL
))
{
...
...
dlls/ntdll/directory.c
View file @
f4024eaa
...
...
@@ -77,6 +77,7 @@
#include "windef.h"
#include "winnt.h"
#include "winternl.h"
#include "ddk/wdm.h"
#include "ntdll_misc.h"
#include "wine/unicode.h"
#include "wine/server.h"
...
...
@@ -161,7 +162,6 @@ static int show_dot_files = -1;
/* at some point we may want to allow Winelib apps to set this */
static
const
int
is_case_sensitive
=
FALSE
;
UNICODE_STRING
windows_dir
=
{
0
,
0
,
NULL
};
/* windows directory */
UNICODE_STRING
system_dir
=
{
0
,
0
,
NULL
};
/* system directory */
static
struct
file_identity
curdir
;
...
...
@@ -2282,16 +2282,16 @@ static void init_redirects(void)
struct
stat
st
;
unsigned
int
i
;
if
(
!
RtlDosPathNameToNtPathName_U
(
windows_dir
.
Buffer
,
&
nt_name
,
NULL
,
NULL
))
if
(
!
RtlDosPathNameToNtPathName_U
(
user_shared_data
->
NtSystemRoot
,
&
nt_name
,
NULL
,
NULL
))
{
ERR
(
"can't convert %s
\n
"
,
debugstr_
us
(
&
windows_dir
)
);
ERR
(
"can't convert %s
\n
"
,
debugstr_
w
(
user_shared_data
->
NtSystemRoot
)
);
return
;
}
status
=
wine_nt_to_unix_file_name
(
&
nt_name
,
&
unix_name
,
FILE_OPEN_IF
,
FALSE
);
RtlFreeUnicodeString
(
&
nt_name
);
if
(
status
)
{
ERR
(
"cannot open %s (%x)
\n
"
,
debugstr_
us
(
&
windows_dir
),
status
);
ERR
(
"cannot open %s (%x)
\n
"
,
debugstr_
w
(
user_shared_data
->
NtSystemRoot
),
status
);
return
;
}
if
(
!
stat
(
unix_name
.
Buffer
,
&
st
))
...
...
@@ -2389,7 +2389,6 @@ void DIR_init_windows_dir( const WCHAR *win, const WCHAR *sys )
{
/* FIXME: should probably store paths as NT file names */
RtlCreateUnicodeString
(
&
windows_dir
,
win
);
RtlCreateUnicodeString
(
&
system_dir
,
sys
);
#ifndef _WIN64
...
...
dlls/ntdll/loader.c
View file @
f4024eaa
...
...
@@ -1753,16 +1753,16 @@ static NTSTATUS find_actctx_dll( LPCWSTR libname, LPWSTR *fullname )
}
}
needed
=
(
windows_dir
.
Length
+
sizeof
(
winsxsW
)
+
info
->
ulAssemblyDirectoryNameLength
+
nameW
.
Length
+
2
*
sizeof
(
WCHAR
));
needed
=
(
strlenW
(
user_shared_data
->
NtSystemRoot
)
*
sizeof
(
WCHAR
)
+
sizeof
(
winsxsW
)
+
info
->
ulAssemblyDirectoryNameLength
+
nameW
.
Length
+
2
*
sizeof
(
WCHAR
));
if
(
!
(
*
fullname
=
p
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
needed
)))
{
status
=
STATUS_NO_MEMORY
;
goto
done
;
}
memcpy
(
p
,
windows_dir
.
Buffer
,
windows_dir
.
Length
);
p
+=
windows_dir
.
Length
/
sizeof
(
WCHAR
);
strcpyW
(
p
,
user_shared_data
->
NtSystemRoot
);
p
+=
strlenW
(
p
);
memcpy
(
p
,
winsxsW
,
sizeof
(
winsxsW
)
);
p
+=
sizeof
(
winsxsW
)
/
sizeof
(
WCHAR
);
memcpy
(
p
,
info
->
lpAssemblyDirectoryName
,
info
->
ulAssemblyDirectoryNameLength
);
...
...
@@ -2812,8 +2812,8 @@ void CDECL __wine_init_windows_dir( const WCHAR *windir, const WCHAR *sysdir )
PLIST_ENTRY
mark
,
entry
;
LPWSTR
buffer
,
p
;
DIR_init_windows_dir
(
windir
,
sysdir
);
strcpyW
(
user_shared_data
->
NtSystemRoot
,
windir
);
DIR_init_windows_dir
(
windir
,
sysdir
);
/* prepend the system dir to the name of the already created modules */
mark
=
&
NtCurrentTeb
()
->
Peb
->
LdrData
->
InLoadOrderModuleList
;
...
...
dlls/ntdll/ntdll_misc.h
View file @
f4024eaa
...
...
@@ -107,7 +107,6 @@ extern FARPROC SNOOP_GetProcAddress( HMODULE hmod, const IMAGE_EXPORT_DIRECTORY
FARPROC
origfun
,
DWORD
ordinal
,
const
WCHAR
*
user
)
DECLSPEC_HIDDEN
;
extern
void
RELAY_SetupDLL
(
HMODULE
hmod
)
DECLSPEC_HIDDEN
;
extern
void
SNOOP_SetupDLL
(
HMODULE
hmod
)
DECLSPEC_HIDDEN
;
extern
UNICODE_STRING
windows_dir
DECLSPEC_HIDDEN
;
extern
UNICODE_STRING
system_dir
DECLSPEC_HIDDEN
;
typedef
LONG
(
WINAPI
*
PUNHANDLED_EXCEPTION_FILTER
)(
PEXCEPTION_POINTERS
);
...
...
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