ntdll: Add RtlSetThreadErrorMode and RtlGetThreadErrorMode.

This commit is contained in:
Peter Rosin 2010-02-02 13:50:16 +01:00 committed by Alexandre Julliard
parent 2cf159f612
commit bdebad094c
4 changed files with 28 additions and 1 deletions

View File

@ -643,6 +643,7 @@
@ stdcall RtlGetSaclSecurityDescriptor(ptr ptr ptr ptr)
# @ stub RtlGetSecurityDescriptorRMControl
# @ stub RtlGetSetBootStatusData
@ stdcall RtlGetThreadErrorMode()
# @ stub RtlGetUnloadEventTrace
@ stub RtlGetUserInfoHeap
@ stdcall RtlGetVersion(ptr)
@ -842,6 +843,7 @@
# @ stub RtlSetSecurityDescriptorRMControl
@ stub RtlSetSecurityObject
# @ stub RtlSetSecurityObjectEx
@ stdcall RtlSetThreadErrorMode(long ptr)
# @ stub RtlSetThreadIsCritical
# @ stub RtlSetThreadPoolStartFunc
@ stdcall RtlSetTimeZoneInformation(ptr)

View File

@ -1165,3 +1165,26 @@ NTSTATUS WINAPI RtlDecompressBuffer(USHORT CompressionFormat, PUCHAR Uncompresse
return STATUS_NOT_IMPLEMENTED;
}
/***********************************************************************
* RtlSetThreadErrorMode [NTDLL.@]
*/
NTSTATUS WINAPI RtlSetThreadErrorMode( DWORD mode, LPDWORD oldmode )
{
if (mode & ~0x70)
return STATUS_INVALID_PARAMETER_1;
if (oldmode)
*oldmode = NtCurrentTeb()->HardErrorDisabled;
NtCurrentTeb()->HardErrorDisabled = mode;
return STATUS_SUCCESS;
}
/***********************************************************************
* RtlGetThreadErrorMode [NTDLL.@]
*/
DWORD WINAPI RtlGetThreadErrorMode( void )
{
return NtCurrentTeb()->HardErrorDisabled;
}

View File

@ -1039,7 +1039,7 @@ static void test_RtlThreadErrorMode(void)
if (!pRtlGetThreadErrorMode || !pRtlSetThreadErrorMode)
{
skip("RtlGetThreadErrorMode and/or RtlSetThreadErrorMode not available\n");
win_skip("RtlGetThreadErrorMode and/or RtlSetThreadErrorMode not available\n");
return;
}

View File

@ -2273,6 +2273,7 @@ NTSYSAPI ULONG WINAPI RtlGetNtGlobalFlags(void);
NTSYSAPI BOOLEAN WINAPI RtlGetNtProductType(LPDWORD);
NTSYSAPI NTSTATUS WINAPI RtlGetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID *,PBOOLEAN);
NTSYSAPI ULONG WINAPI RtlGetProcessHeaps(ULONG,HANDLE*);
NTSYSAPI DWORD WINAPI RtlGetThreadErrorMode(void);
NTSYSAPI NTSTATUS WINAPI RtlGetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR,PBOOLEAN,PACL *,PBOOLEAN);
NTSYSAPI NTSTATUS WINAPI RtlGetVersion(RTL_OSVERSIONINFOEXW*);
NTSYSAPI NTSTATUS WINAPI RtlGUIDFromString(PUNICODE_STRING,GUID*);
@ -2364,6 +2365,7 @@ NTSYSAPI NTSTATUS WINAPI RtlSetIoCompletionCallback(HANDLE,PRTL_OVERLAPPED_COMP
NTSYSAPI void WINAPI RtlSetLastWin32Error(DWORD);
NTSYSAPI void WINAPI RtlSetLastWin32ErrorAndNtStatusFromNtStatus(NTSTATUS);
NTSYSAPI NTSTATUS WINAPI RtlSetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR,BOOLEAN,PACL,BOOLEAN);
NTSYSAPI NTSTATUS WINAPI RtlSetThreadErrorMode(DWORD,LPDWORD);
NTSYSAPI NTSTATUS WINAPI RtlSetTimeZoneInformation(const RTL_TIME_ZONE_INFORMATION*);
NTSYSAPI SIZE_T WINAPI RtlSizeHeap(HANDLE,ULONG,const void*);
NTSYSAPI NTSTATUS WINAPI RtlStringFromGUID(REFGUID,PUNICODE_STRING);