mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-15 05:57:27 +00:00
win32u: Use RtlGetLastWin32Error() instead of GetLastError().
This commit is contained in:
parent
cc0ac7b430
commit
1d6b3e1434
|
@ -2391,6 +2391,14 @@ ULONG WINAPI RtlNtStatusToDosError( NTSTATUS status )
|
||||||
return map_status( status );
|
return map_status( status );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**********************************************************************
|
||||||
|
* RtlGetLastWin32Error (ntdll.so)
|
||||||
|
*/
|
||||||
|
DWORD WINAPI RtlGetLastWin32Error(void)
|
||||||
|
{
|
||||||
|
return NtCurrentTeb()->LastErrorValue;
|
||||||
|
}
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* RtlSetLastWin32Error (ntdll.so)
|
* RtlSetLastWin32Error (ntdll.so)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -56,7 +56,7 @@ static struct list formats_to_free = LIST_INIT( formats_to_free );
|
||||||
static const char *debugstr_format( UINT id )
|
static const char *debugstr_format( UINT id )
|
||||||
{
|
{
|
||||||
WCHAR buffer[256];
|
WCHAR buffer[256];
|
||||||
DWORD le = GetLastError();
|
DWORD le = RtlGetLastWin32Error();
|
||||||
BOOL r = NtUserGetClipboardFormatName( id, buffer, ARRAYSIZE(buffer) );
|
BOOL r = NtUserGetClipboardFormatName( id, buffer, ARRAYSIZE(buffer) );
|
||||||
RtlSetLastWin32Error(le);
|
RtlSetLastWin32Error(le);
|
||||||
|
|
||||||
|
|
|
@ -2213,7 +2213,7 @@ static void SPY_GetWndName( SPY_INSTANCE *sp_e )
|
||||||
const char *debugstr_msg_name( UINT msg, HWND hWnd )
|
const char *debugstr_msg_name( UINT msg, HWND hWnd )
|
||||||
{
|
{
|
||||||
SPY_INSTANCE ext_sp_e;
|
SPY_INSTANCE ext_sp_e;
|
||||||
DWORD save_error = GetLastError();
|
DWORD save_error = RtlGetLastWin32Error();
|
||||||
|
|
||||||
ext_sp_e.msgnum = msg;
|
ext_sp_e.msgnum = msg;
|
||||||
ext_sp_e.msg_hwnd = hWnd;
|
ext_sp_e.msg_hwnd = hWnd;
|
||||||
|
@ -2504,7 +2504,7 @@ static void SPY_DumpStructure(const SPY_INSTANCE *sp_e, BOOL enter)
|
||||||
/* for CUSTOMDRAW, dump all the data for TOOLBARs */
|
/* for CUSTOMDRAW, dump all the data for TOOLBARs */
|
||||||
if (pnmh->code == NM_CUSTOMDRAW) {
|
if (pnmh->code == NM_CUSTOMDRAW) {
|
||||||
/* save and restore error code over the next call */
|
/* save and restore error code over the next call */
|
||||||
save_error = GetLastError();
|
save_error = RtlGetLastWin32Error();
|
||||||
NtUserGetClassName( pnmh->hwndFrom, FALSE, &str );
|
NtUserGetClassName( pnmh->hwndFrom, FALSE, &str );
|
||||||
RtlSetLastWin32Error(save_error);
|
RtlSetLastWin32Error(save_error);
|
||||||
if (wcscmp(TOOLBARCLASSNAMEW, from_class) == 0)
|
if (wcscmp(TOOLBARCLASSNAMEW, from_class) == 0)
|
||||||
|
@ -2597,7 +2597,7 @@ void spy_enter_message( INT iFlag, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lP
|
||||||
{
|
{
|
||||||
SPY_INSTANCE sp_e;
|
SPY_INSTANCE sp_e;
|
||||||
int indent;
|
int indent;
|
||||||
DWORD save_error = GetLastError();
|
DWORD save_error = RtlGetLastWin32Error();
|
||||||
|
|
||||||
if (!spy_init() || exclude_msg(msg)) return;
|
if (!spy_init() || exclude_msg(msg)) return;
|
||||||
|
|
||||||
|
@ -2652,7 +2652,7 @@ void spy_exit_message( INT iFlag, HWND hWnd, UINT msg, LRESULT lReturn,
|
||||||
{
|
{
|
||||||
SPY_INSTANCE sp_e;
|
SPY_INSTANCE sp_e;
|
||||||
int indent;
|
int indent;
|
||||||
DWORD save_error = GetLastError();
|
DWORD save_error = RtlGetLastWin32Error();
|
||||||
|
|
||||||
if (!TRACE_ON(message) || exclude_msg(msg) ||
|
if (!TRACE_ON(message) || exclude_msg(msg) ||
|
||||||
(exclude_dwp() && iFlag == SPY_RESULT_DEFWND))
|
(exclude_dwp() && iFlag == SPY_RESULT_DEFWND))
|
||||||
|
|
|
@ -852,7 +852,7 @@ BOOL is_window_enabled( HWND hwnd )
|
||||||
|
|
||||||
RtlSetLastWin32Error( NO_ERROR );
|
RtlSetLastWin32Error( NO_ERROR );
|
||||||
ret = get_window_long( hwnd, GWL_STYLE );
|
ret = get_window_long( hwnd, GWL_STYLE );
|
||||||
if (!ret && GetLastError() != NO_ERROR) return FALSE;
|
if (!ret && RtlGetLastWin32Error() != NO_ERROR) return FALSE;
|
||||||
return !(ret & WS_DISABLED);
|
return !(ret & WS_DISABLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4879,7 +4879,7 @@ static WND *create_window_handle( HWND parent, HWND owner, UNICODE_STRING *name,
|
||||||
|
|
||||||
if (!handle)
|
if (!handle)
|
||||||
{
|
{
|
||||||
WARN( "error %d creating window\n", GetLastError() );
|
WARN( "error %d creating window\n", RtlGetLastWin32Error() );
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue