From 3e3b03a13eba14ddb2f9d5ce331d51ed7e7834c8 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Fri, 3 Oct 2014 20:01:19 +0200 Subject: [PATCH] kernel32: Set proper error codes if FindFirstFileExW doesn't support specific search_ops / levels. --- dlls/kernel32/file.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/kernel32/file.c b/dlls/kernel32/file.c index 512b63eb2b8..4a6fc138c09 100644 --- a/dlls/kernel32/file.c +++ b/dlls/kernel32/file.c @@ -1872,11 +1872,13 @@ HANDLE WINAPI FindFirstFileExW( LPCWSTR filename, FINDEX_INFO_LEVELS level, if (search_op != FindExSearchNameMatch && search_op != FindExSearchLimitToDirectories) { FIXME("search_op not implemented 0x%08x\n", search_op); + SetLastError( ERROR_INVALID_PARAMETER ); return INVALID_HANDLE_VALUE; } if (level != FindExInfoStandard) { FIXME("info level %d not implemented\n", level ); + SetLastError( ERROR_INVALID_PARAMETER ); return INVALID_HANDLE_VALUE; }