Author: dchapyshev
Date: Thu Jan 8 14:49:11 2009
New Revision: 38654
URL:
http://svn.reactos.org/svn/reactos?rev=38654&view=rev
Log:
- Fix regression of Dependency Walker
See issue #3374 for more details.
Modified:
trunk/reactos/dll/win32/kernel32/misc/actctx.c
trunk/reactos/lib/rtl/actctx.c
Modified: trunk/reactos/dll/win32/kernel32/misc/actctx.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/ac…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/misc/actctx.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/misc/actctx.c [iso-8859-1] Thu Jan 8 14:49:11 2009
@@ -191,8 +191,13 @@
ULONG_PTR ulCookie
)
{
+ NTSTATUS Status;
+
DPRINT("DeactivateActCtx(%08lx %08lx)\n", dwFlags, ulCookie);
- RtlDeactivateActivationContext(dwFlags, ulCookie);
+ Status = RtlDeactivateActivationContext(dwFlags, ulCookie);
+
+ if (!NT_SUCCESS(Status)) return FALSE;
+
return TRUE;
}
Modified: trunk/reactos/lib/rtl/actctx.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/actctx.c?rev=38654…
==============================================================================
--- trunk/reactos/lib/rtl/actctx.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/actctx.c [iso-8859-1] Thu Jan 8 14:49:11 2009
@@ -14,6 +14,19 @@
#include <debug.h>
#define QUERY_ACTCTX_FLAG_ACTIVE (0x00000001)
+
+#define ACTCTX_FLAGS_ALL (\
+ ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID |\
+ ACTCTX_FLAG_LANGID_VALID |\
+ ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID |\
+ ACTCTX_FLAG_RESOURCE_NAME_VALID |\
+ ACTCTX_FLAG_SET_PROCESS_DEFAULT |\
+ ACTCTX_FLAG_APPLICATION_NAME_VALID |\
+ ACTCTX_FLAG_SOURCE_IS_ASSEMBLYREF |\
+ ACTCTX_FLAG_HMODULE_VALID )
+
+#define ACTCTX_FAKE_HANDLE ((HANDLE) 0xf00baa)
+#define ACTCTX_FAKE_COOKIE ((ULONG_PTR) 0xf00bad)
/* FUNCTIONS ***************************************************************/
@@ -46,7 +59,10 @@
RtlGetActiveActivationContext(IN PVOID *Context)
{
UNIMPLEMENTED;
- return STATUS_NOT_IMPLEMENTED;
+
+ *Context = ACTCTX_FAKE_HANDLE;
+
+ return STATUS_SUCCESS;
}
VOID
@@ -112,6 +128,10 @@
ULONG_PTR ulCookie)
{
UNIMPLEMENTED;
+
+ if (ulCookie == ACTCTX_FAKE_COOKIE)
+ return STATUS_SUCCESS;
+
return STATUS_NOT_IMPLEMENTED;
}
@@ -128,13 +148,28 @@
RtlActivateActivationContext(IN ULONG Unknown, IN HANDLE Handle, OUT PULONG_PTR Cookie)
{
UNIMPLEMENTED;
- return STATUS_NOT_IMPLEMENTED;
+
+ if (Cookie)
+ *Cookie = ACTCTX_FAKE_COOKIE;
+
+ return STATUS_SUCCESS;
}
NTSTATUS
NTAPI
RtlCreateActivationContext(OUT PHANDLE Handle, IN OUT PVOID ReturnedData)
{
+ PCACTCTXW pActCtx = (PCACTCTXW) ReturnedData;
+
UNIMPLEMENTED;
- return STATUS_NOT_IMPLEMENTED;
+
+ if (!pActCtx)
+ *Handle = INVALID_HANDLE_VALUE;
+ if (pActCtx->cbSize != sizeof *pActCtx)
+ *Handle = INVALID_HANDLE_VALUE;
+ if (pActCtx->dwFlags & ~ACTCTX_FLAGS_ALL)
+ *Handle = INVALID_HANDLE_VALUE;
+ *Handle = ACTCTX_FAKE_HANDLE;
+
+ return STATUS_SUCCESS;
}