Module: wine Branch: master Commit: e98933a2795363471673fef8779112826bf13f14 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e98933a2795363471673fef877...
Author: Maarten Lankhorst m.b.lankhorst@gmail.com Date: Sun Jun 22 00:11:23 2008 -0700
ntdll: Use module for path to activation context.
---
dlls/ntdll/actctx.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c index 8f9a2c1..80e9e03 100644 --- a/dlls/ntdll/actctx.c +++ b/dlls/ntdll/actctx.c @@ -2210,9 +2210,12 @@ NTSTATUS WINAPI RtlCreateActivationContext( HANDLE *handle, const void *ptr ) { UNICODE_STRING dir; WCHAR *p; + HMODULE module;
- if ((status = get_module_filename( NtCurrentTeb()->Peb->ImageBaseAddress, &dir, 0 ))) - goto error; + if (pActCtx->dwFlags & ACTCTX_FLAG_HMODULE_VALID) module = pActCtx->hModule; + else module = NtCurrentTeb()->Peb->ImageBaseAddress; + + if ((status = get_module_filename( module, &dir, 0 ))) goto error; if ((p = strrchrW( dir.Buffer, '\' ))) p[1] = 0; actctx->appdir.info = dir.Buffer; }