Author: cfinck
Date: Mon May 12 15:01:48 2008
New Revision: 33484
URL:
http://svn.reactos.org/svn/reactos?rev=33484&view=rev
Log:
The lstr* functions don't reset the last error on an exception. Also they handle more
than just access violation exceptions.
This makes us passing (at least) one more sub test of a Wine test (user32_winetest text)
Behaviour verified under Windows XP SP2.
Modified:
trunk/reactos/dll/win32/kernel32/string/lstring.c
Modified: trunk/reactos/dll/win32/kernel32/string/lstring.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/string/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/string/lstring.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/string/lstring.c [iso-8859-1] Mon May 12 15:01:48
2008
@@ -10,15 +10,6 @@
#include <k32.h>
-static _SEH_FILTER(lstr_page_fault)
-{
- if (_SEH_GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION)
- return _SEH_EXECUTE_HANDLER;
- else
- return _SEH_CONTINUE_SEARCH;
-}
-
-
/*
* @implemented
*/
@@ -98,10 +89,7 @@
Ret = lpString1;
}
- _SEH_EXCEPT(lstr_page_fault)
- {
- SetLastError( ERROR_INVALID_PARAMETER );
- }
+ _SEH_HANDLE
_SEH_END;
return Ret;
@@ -125,10 +113,7 @@
memmove(lpString1, lpString2, strlen(lpString2) + 1);
Ret = lpString1;
}
- _SEH_EXCEPT(lstr_page_fault)
- {
- SetLastError(ERROR_INVALID_PARAMETER);
- }
+ _SEH_HANDLE
_SEH_END;
return Ret;
@@ -151,10 +136,7 @@
{
Ret = strcat(lpString1, lpString2);
}
- _SEH_EXCEPT(lstr_page_fault)
- {
- SetLastError(ERROR_INVALID_PARAMETER);
- }
+ _SEH_HANDLE
_SEH_END;
return Ret;
@@ -177,10 +159,7 @@
{
Ret = strlen(lpString);
}
- _SEH_EXCEPT(lstr_page_fault)
- {
- SetLastError(ERROR_INVALID_PARAMETER);
- }
+ _SEH_HANDLE
_SEH_END;
return Ret;
@@ -266,10 +245,7 @@
Ret = lpString1;
}
- _SEH_EXCEPT(lstr_page_fault)
- {
- SetLastError( ERROR_INVALID_PARAMETER );
- }
+ _SEH_HANDLE
_SEH_END;
return Ret;
@@ -292,10 +268,7 @@
{
Ret = wcscpy(lpString1, lpString2);
}
- _SEH_EXCEPT(lstr_page_fault)
- {
- SetLastError(ERROR_INVALID_PARAMETER);
- }
+ _SEH_HANDLE
_SEH_END;
return Ret;
@@ -318,10 +291,7 @@
{
Ret = wcscat(lpString1, lpString2);
}
- _SEH_EXCEPT(lstr_page_fault)
- {
- SetLastError(ERROR_INVALID_PARAMETER);
- }
+ _SEH_HANDLE
_SEH_END;
return Ret;
@@ -343,11 +313,8 @@
{
Ret = wcslen(lpString);
}
- _SEH_EXCEPT(lstr_page_fault)
- {
- SetLastError(ERROR_INVALID_PARAMETER);
- }
- _SEH_END;
-
- return Ret;
-}
+ _SEH_HANDLE
+ _SEH_END;
+
+ return Ret;
+}