From 83486aaf668a7319c1a0c740c1c6ea67b737dc96 Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Mon, 1 Feb 2010 10:35:37 +0100 Subject: [PATCH] userenv: Implement DestroyEnvironmentBlock. --- dlls/userenv/userenv.spec | 2 +- dlls/userenv/userenv_main.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/dlls/userenv/userenv.spec b/dlls/userenv/userenv.spec index 26475e59085..8b0b7491bc5 100644 --- a/dlls/userenv/userenv.spec +++ b/dlls/userenv/userenv.spec @@ -1,5 +1,5 @@ @ stdcall CreateEnvironmentBlock(ptr ptr long) -@ stub DestroyEnvironmentBlock +@ stdcall DestroyEnvironmentBlock(ptr) @ stdcall ExpandEnvironmentStringsForUserA(ptr str ptr long) @ stdcall ExpandEnvironmentStringsForUserW(ptr wstr ptr long) @ stdcall GetAllUsersProfileDirectoryA(ptr ptr) diff --git a/dlls/userenv/userenv_main.c b/dlls/userenv/userenv_main.c index 8782c9412c5..38fb64c9d44 100644 --- a/dlls/userenv/userenv_main.c +++ b/dlls/userenv/userenv_main.c @@ -65,6 +65,17 @@ BOOL WINAPI CreateEnvironmentBlock( LPVOID* lpEnvironment, return FALSE; } +BOOL WINAPI DestroyEnvironmentBlock(LPVOID lpEnvironment) +{ + NTSTATUS r; + + TRACE("%p\n", lpEnvironment); + r = RtlDestroyEnvironment(lpEnvironment); + if (r == STATUS_SUCCESS) + return TRUE; + return FALSE; +} + BOOL WINAPI ExpandEnvironmentStringsForUserA( HANDLE hToken, LPCSTR lpSrc, LPSTR lpDest, DWORD dwSize ) {