userenv: Initial implementation of CreateEnvironmentBlock.
This commit is contained in:
parent
ffb0457982
commit
bca84d5467
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue