[ros-diffs] [cwittich] 45956: sync RtlCreateActivationContext with wine 1.1.40

cwittich at svn.reactos.org cwittich at svn.reactos.org
Sat Mar 6 17:19:07 CET 2010


Author: cwittich
Date: Sat Mar  6 17:19:07 2010
New Revision: 45956

URL: http://svn.reactos.org/svn/reactos?rev=45956&view=rev
Log:
sync RtlCreateActivationContext with wine 1.1.40

Modified:
    trunk/reactos/lib/rtl/actctx.c

Modified: trunk/reactos/lib/rtl/actctx.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/actctx.c?rev=45956&r1=45955&r2=45956&view=diff
==============================================================================
--- trunk/reactos/lib/rtl/actctx.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/actctx.c [iso-8859-1] Sat Mar  6 17:19:07 2010
@@ -2272,10 +2272,12 @@
     {
         UNICODE_STRING dir;
         WCHAR *p;
-
-        if ((status = get_module_filename( NtCurrentTeb()->ProcessEnvironmentBlock->ImageBaseAddress, &dir, 0 )))
-            goto error;
-
+        HMODULE module;
+
+        if (pActCtx->dwFlags & ACTCTX_FLAG_HMODULE_VALID) module = pActCtx->hModule;
+        else module = NtCurrentTeb()->ProcessEnvironmentBlock->ImageBaseAddress;
+
+        if ((status = get_module_filename( module, &dir, 0 ))) goto error;
         if ((p = strrchrW( dir.Buffer, '\\' ))) p[1] = 0;
         actctx->appdir.info = dir.Buffer;
     }
@@ -2339,7 +2341,6 @@
 
     if (status == STATUS_SUCCESS) *handle = actctx;
     else actctx_release( actctx );
-
     return status;
 
 error:




More information about the Ros-diffs mailing list