[PATCH] userenv: GetUserProfileDirectoryW should fail with ERROR_INVALID_HANDLE if handle is NULL.
Alexandre Julliard
julliard at winehq.org
Fri Nov 4 05:00:22 CDT 2011
Christian Inci <chris.pcguy.inci at gmail.com> writes:
> @@ -149,6 +149,12 @@ BOOL WINAPI GetUserProfileDirectoryW( HANDLE hToken, LPWSTR lpProfileDir,
>
> TRACE( "%p %p %p\n", hToken, lpProfileDir, lpcchSize );
>
> + if (!hToken)
> + {
> + SetLastError( ERROR_INVALID_HANDLE );
> + return FALSE;
> + }
There's no reason to treat a 0 handle differently. Please stop adding
such special cases just to satisfy the tests. Parameter checking needs
to fall out of the implementation.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list