summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2017-12-07 07:41:50 +0000
committermidipix <writeonce@midipix.org>2017-12-08 02:51:02 -0500
commitda3cfa96f27ac47f6193b1b631db510c234f9bdc (patch)
treeda4360c2690089c61ccbb9bdb597861e0286f37e
parent7b64a66558cf2311f707ff8de8c366f027673eae (diff)
downloadntapi-da3cfa96f27ac47f6193b1b631db510c234f9bdc.tar.bz2
ntapi-da3cfa96f27ac47f6193b1b631db510c234f9bdc.tar.xz
__ntapi_ldr_load_system_dll(): use shell-style path for the system32 directory.
-rw-r--r--src/ldr/ntapi_ldr_load_system_dll.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ldr/ntapi_ldr_load_system_dll.c b/src/ldr/ntapi_ldr_load_system_dll.c
index 29fc3b3..6265cdf 100644
--- a/src/ldr/ntapi_ldr_load_system_dll.c
+++ b/src/ldr/ntapi_ldr_load_system_dll.c
@@ -30,12 +30,16 @@ int32_t __stdcall __ntapi_ldr_load_system_dll(
sysdir = (wchar16_t *)buffer;
+ /* shell-style dos path */
if ((status = __ntapi->tt_get_system_directory_dos_path(
hsysdir,
sysdir,sizeof(buffer),
0,0,&nt_sysdir)))
return status;
+ sysdir = &sysdir[4];
+
+ /* image */
nt_image_name.strlen = base_name_size;
nt_image_name.maxlen = base_name_size;
nt_image_name.buffer = base_name;