Commit 0534beb3 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Use syscall thunks for object manager functions.

parent 40d403c9
...@@ -200,7 +200,7 @@ ...@@ -200,7 +200,7 @@
@ stdcall NtDeleteValueKey(long ptr) @ stdcall NtDeleteValueKey(long ptr)
@ stdcall -syscall NtDeviceIoControlFile(long long ptr ptr ptr long ptr long ptr long) @ stdcall -syscall NtDeviceIoControlFile(long long ptr ptr ptr long ptr long ptr long)
@ stdcall NtDisplayString(ptr) @ stdcall NtDisplayString(ptr)
@ stdcall NtDuplicateObject(long long long ptr long long long) @ stdcall -syscall NtDuplicateObject(long long long ptr long long long)
@ stdcall NtDuplicateToken(long long ptr long long ptr) @ stdcall NtDuplicateToken(long long ptr long long ptr)
# @ stub NtEnumerateBootEntries # @ stub NtEnumerateBootEntries
@ stub NtEnumerateBus @ stub NtEnumerateBus
...@@ -305,7 +305,7 @@ ...@@ -305,7 +305,7 @@
@ stdcall NtQueryLicenseValue(ptr ptr ptr long ptr) @ stdcall NtQueryLicenseValue(ptr ptr ptr long ptr)
@ stdcall NtQueryMultipleValueKey(long ptr long ptr long ptr) @ stdcall NtQueryMultipleValueKey(long ptr long ptr long ptr)
@ stdcall -syscall NtQueryMutant(long long ptr long ptr) @ stdcall -syscall NtQueryMutant(long long ptr long ptr)
@ stdcall NtQueryObject(long long ptr long ptr) @ stdcall -syscall NtQueryObject(long long ptr long ptr)
@ stub NtQueryOpenSubKeys @ stub NtQueryOpenSubKeys
@ stdcall NtQueryPerformanceCounter(ptr ptr) @ stdcall NtQueryPerformanceCounter(ptr ptr)
# @ stub NtQueryPortInformationProcess # @ stub NtQueryPortInformationProcess
...@@ -376,7 +376,7 @@ ...@@ -376,7 +376,7 @@
@ stdcall -syscall NtSetInformationFile(long ptr ptr long long) @ stdcall -syscall NtSetInformationFile(long ptr ptr long long)
@ stdcall -syscall NtSetInformationJobObject(long long ptr long) @ stdcall -syscall NtSetInformationJobObject(long long ptr long)
@ stdcall NtSetInformationKey(long long ptr long) @ stdcall NtSetInformationKey(long long ptr long)
@ stdcall NtSetInformationObject(long long ptr long) @ stdcall -syscall NtSetInformationObject(long long ptr long)
@ stdcall -syscall NtSetInformationProcess(long long ptr long) @ stdcall -syscall NtSetInformationProcess(long long ptr long)
@ stdcall -syscall NtSetInformationThread(long long ptr long) @ stdcall -syscall NtSetInformationThread(long long ptr long)
@ stdcall NtSetInformationToken(long long ptr long) @ stdcall NtSetInformationToken(long long ptr long)
...@@ -1187,7 +1187,7 @@ ...@@ -1187,7 +1187,7 @@
@ stdcall -private ZwDeleteValueKey(long ptr) NtDeleteValueKey @ stdcall -private ZwDeleteValueKey(long ptr) NtDeleteValueKey
@ stdcall -private -syscall ZwDeviceIoControlFile(long long ptr ptr ptr long ptr long ptr long) NtDeviceIoControlFile @ stdcall -private -syscall ZwDeviceIoControlFile(long long ptr ptr ptr long ptr long ptr long) NtDeviceIoControlFile
@ stdcall -private ZwDisplayString(ptr) NtDisplayString @ stdcall -private ZwDisplayString(ptr) NtDisplayString
@ stdcall -private ZwDuplicateObject(long long long ptr long long long) NtDuplicateObject @ stdcall -private -syscall ZwDuplicateObject(long long long ptr long long long) NtDuplicateObject
@ stdcall -private ZwDuplicateToken(long long ptr long long ptr) NtDuplicateToken @ stdcall -private ZwDuplicateToken(long long ptr long long ptr) NtDuplicateToken
# @ stub ZwEnumerateBootEntries # @ stub ZwEnumerateBootEntries
@ stub ZwEnumerateBus @ stub ZwEnumerateBus
...@@ -1292,7 +1292,7 @@ ...@@ -1292,7 +1292,7 @@
@ stdcall -private ZwQueryLicenseValue(ptr ptr ptr long ptr) NtQueryLicenseValue @ stdcall -private ZwQueryLicenseValue(ptr ptr ptr long ptr) NtQueryLicenseValue
@ stdcall -private ZwQueryMultipleValueKey(long ptr long ptr long ptr) NtQueryMultipleValueKey @ stdcall -private ZwQueryMultipleValueKey(long ptr long ptr long ptr) NtQueryMultipleValueKey
@ stdcall -private -syscall ZwQueryMutant(long long ptr long ptr) NtQueryMutant @ stdcall -private -syscall ZwQueryMutant(long long ptr long ptr) NtQueryMutant
@ stdcall -private ZwQueryObject(long long ptr long ptr) NtQueryObject @ stdcall -private -syscall ZwQueryObject(long long ptr long ptr) NtQueryObject
@ stub ZwQueryOpenSubKeys @ stub ZwQueryOpenSubKeys
@ stdcall -private ZwQueryPerformanceCounter(ptr ptr) NtQueryPerformanceCounter @ stdcall -private ZwQueryPerformanceCounter(ptr ptr) NtQueryPerformanceCounter
# @ stub ZwQueryPortInformationProcess # @ stub ZwQueryPortInformationProcess
...@@ -1363,7 +1363,7 @@ ...@@ -1363,7 +1363,7 @@
@ stdcall -private -syscall ZwSetInformationFile(long ptr ptr long long) NtSetInformationFile @ stdcall -private -syscall ZwSetInformationFile(long ptr ptr long long) NtSetInformationFile
@ stdcall -private -syscall ZwSetInformationJobObject(long long ptr long) NtSetInformationJobObject @ stdcall -private -syscall ZwSetInformationJobObject(long long ptr long) NtSetInformationJobObject
@ stdcall -private ZwSetInformationKey(long long ptr long) NtSetInformationKey @ stdcall -private ZwSetInformationKey(long long ptr long) NtSetInformationKey
@ stdcall -private ZwSetInformationObject(long long ptr long) NtSetInformationObject @ stdcall -private -syscall ZwSetInformationObject(long long ptr long) NtSetInformationObject
@ stdcall -private -syscall ZwSetInformationProcess(long long ptr long) NtSetInformationProcess @ stdcall -private -syscall ZwSetInformationProcess(long long ptr long) NtSetInformationProcess
@ stdcall -private -syscall ZwSetInformationThread(long long ptr long) NtSetInformationThread @ stdcall -private -syscall ZwSetInformationThread(long long ptr long) NtSetInformationThread
@ stdcall -private ZwSetInformationToken(long long ptr long) NtSetInformationToken @ stdcall -private ZwSetInformationToken(long long ptr long) NtSetInformationToken
......
...@@ -40,29 +40,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(ntdll); ...@@ -40,29 +40,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(ntdll);
*/ */
/****************************************************************************** /******************************************************************************
* NtQueryObject [NTDLL.@]
* ZwQueryObject [NTDLL.@]
*/
NTSTATUS WINAPI NtQueryObject(IN HANDLE handle,
IN OBJECT_INFORMATION_CLASS info_class,
OUT PVOID ptr, IN ULONG len, OUT PULONG used_len)
{
return unix_funcs->NtQueryObject( handle, info_class, ptr, len, used_len );
}
/******************************************************************
* NtSetInformationObject [NTDLL.@]
* ZwSetInformationObject [NTDLL.@]
*
*/
NTSTATUS WINAPI NtSetInformationObject(IN HANDLE handle,
IN OBJECT_INFORMATION_CLASS info_class,
IN PVOID ptr, IN ULONG len)
{
return unix_funcs->NtSetInformationObject( handle, info_class, ptr, len );
}
/******************************************************************************
* NtQuerySecurityObject [NTDLL.@] * NtQuerySecurityObject [NTDLL.@]
* *
* An ntdll analogue to GetKernelObjectSecurity(). * An ntdll analogue to GetKernelObjectSecurity().
...@@ -150,18 +127,6 @@ NtQuerySecurityObject( ...@@ -150,18 +127,6 @@ NtQuerySecurityObject(
} }
/******************************************************************************
* NtDuplicateObject [NTDLL.@]
* ZwDuplicateObject [NTDLL.@]
*/
NTSTATUS WINAPI NtDuplicateObject( HANDLE source_process, HANDLE source,
HANDLE dest_process, PHANDLE dest,
ACCESS_MASK access, ULONG attributes, ULONG options )
{
return unix_funcs->NtDuplicateObject( source_process, source, dest_process,
dest, access, attributes, options );
}
static LONG WINAPI invalid_handle_exception_handler( EXCEPTION_POINTERS *eptr ) static LONG WINAPI invalid_handle_exception_handler( EXCEPTION_POINTERS *eptr )
{ {
EXCEPTION_RECORD *rec = eptr->ExceptionRecord; EXCEPTION_RECORD *rec = eptr->ExceptionRecord;
......
...@@ -1360,11 +1360,8 @@ static struct unix_funcs unix_funcs = ...@@ -1360,11 +1360,8 @@ static struct unix_funcs unix_funcs =
{ {
NtClose, NtClose,
NtCurrentTeb, NtCurrentTeb,
NtDuplicateObject,
NtGetContextThread, NtGetContextThread,
NtQueryObject,
NtQueryPerformanceCounter, NtQueryPerformanceCounter,
NtSetInformationObject,
DbgUiIssueRemoteBreakin, DbgUiIssueRemoteBreakin,
RtlGetSystemTimePrecise, RtlGetSystemTimePrecise,
RtlWaitOnAddress, RtlWaitOnAddress,
......
...@@ -28,22 +28,15 @@ struct msghdr; ...@@ -28,22 +28,15 @@ struct msghdr;
struct _DISPATCHER_CONTEXT; struct _DISPATCHER_CONTEXT;
/* increment this when you change the function table */ /* increment this when you change the function table */
#define NTDLL_UNIXLIB_VERSION 87 #define NTDLL_UNIXLIB_VERSION 88
struct unix_funcs struct unix_funcs
{ {
/* Nt* functions */ /* Nt* functions */
NTSTATUS (WINAPI *NtClose)( HANDLE handle ); NTSTATUS (WINAPI *NtClose)( HANDLE handle );
TEB * (WINAPI *NtCurrentTeb)(void); TEB * (WINAPI *NtCurrentTeb)(void);
NTSTATUS (WINAPI *NtDuplicateObject)( HANDLE source_process, HANDLE source,
HANDLE dest_process, HANDLE *dest,
ACCESS_MASK access, ULONG attributes, ULONG options );
NTSTATUS (WINAPI *NtGetContextThread)( HANDLE handle, CONTEXT *context ); NTSTATUS (WINAPI *NtGetContextThread)( HANDLE handle, CONTEXT *context );
NTSTATUS (WINAPI *NtQueryObject)( HANDLE handle, OBJECT_INFORMATION_CLASS info_class,
void *ptr, ULONG len, ULONG *used_len );
NTSTATUS (WINAPI *NtQueryPerformanceCounter)( LARGE_INTEGER *counter, LARGE_INTEGER *frequency ); NTSTATUS (WINAPI *NtQueryPerformanceCounter)( LARGE_INTEGER *counter, LARGE_INTEGER *frequency );
NTSTATUS (WINAPI *NtSetInformationObject)( HANDLE handle, OBJECT_INFORMATION_CLASS info_class,
void *ptr, ULONG len );
/* other Win32 API functions */ /* other Win32 API functions */
NTSTATUS (WINAPI *DbgUiIssueRemoteBreakin)( HANDLE process ); NTSTATUS (WINAPI *DbgUiIssueRemoteBreakin)( HANDLE process );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment