Commit bca84d54 authored by Lei Zhang's avatar Lei Zhang Committed by Alexandre Julliard

userenv: Initial implementation of CreateEnvironmentBlock.

parent ffb04579
......@@ -3,7 +3,7 @@ TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = userenv.dll
IMPORTS = kernel32
IMPORTS = kernel32 ntdll
IMPORTLIB = userenv
C_SRCS = \
......
......@@ -41,7 +41,7 @@ static void test_create_env(void)
expect(FALSE, r);
r = CreateEnvironmentBlock((LPVOID) &env, NULL, FALSE);
todo_wine expect(TRUE, r);
expect(TRUE, r);
r = OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY|TOKEN_DUPLICATE, &htok);
expect(TRUE, r);
......@@ -50,7 +50,7 @@ static void test_create_env(void)
expect(FALSE, r);
r = CreateEnvironmentBlock((LPVOID) &env2, htok, FALSE);
todo_wine expect(TRUE, r);
expect(TRUE, r);
}
START_TEST(userenv)
......
......@@ -20,9 +20,12 @@
#include <stdarg.h>
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
#include "winternl.h"
#include "userenv.h"
#include "wine/debug.h"
......@@ -49,7 +52,16 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
BOOL WINAPI CreateEnvironmentBlock( LPVOID* lpEnvironment,
HANDLE hToken, BOOL bInherit )
{
FIXME("%p %p %d\n", lpEnvironment, hToken, bInherit );
NTSTATUS r;
TRACE("%p %p %d\n", lpEnvironment, hToken, bInherit );
if (!lpEnvironment)
return FALSE;
r = RtlCreateEnvironment(bInherit, (WCHAR **)lpEnvironment);
if (r == STATUS_SUCCESS)
return TRUE;
return FALSE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment