ntdll: Export KeAddSystemServiceTable() instead of the KeServiceDescriptorTable variable.
This commit is contained in:
parent
48182726e9
commit
0fea0db866
3 changed files with 20 additions and 13 deletions
|
@ -625,6 +625,21 @@ void start_server( BOOL debug )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* KeAddSystemServiceTable
|
||||
*/
|
||||
BOOLEAN KeAddSystemServiceTable( ULONG_PTR *funcs, ULONG_PTR *counters, ULONG limit,
|
||||
BYTE *arguments, ULONG index )
|
||||
{
|
||||
if (index >= ARRAY_SIZE(KeServiceDescriptorTable)) return FALSE;
|
||||
KeServiceDescriptorTable[index].ServiceTable = funcs;
|
||||
KeServiceDescriptorTable[index].CounterTable = counters;
|
||||
KeServiceDescriptorTable[index].ServiceLimit = limit;
|
||||
KeServiceDescriptorTable[index].ArgumentTable = arguments;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
* map_so_dll
|
||||
*
|
||||
|
|
|
@ -36,9 +36,9 @@
|
|||
|
||||
ULONG_PTR zero_bits = 0;
|
||||
|
||||
static void * const syscalls[] =
|
||||
static ULONG_PTR syscalls[] =
|
||||
{
|
||||
#define SYSCALL_ENTRY(id,name,args) name,
|
||||
#define SYSCALL_ENTRY(id,name,args) (ULONG_PTR)name,
|
||||
#ifdef _WIN64
|
||||
ALL_SYSCALLS64
|
||||
#else
|
||||
|
@ -58,14 +58,6 @@ static BYTE arguments[ARRAY_SIZE(syscalls)] =
|
|||
#undef SYSCALL_ENTRY
|
||||
};
|
||||
|
||||
static const SYSTEM_SERVICE_TABLE syscall_table =
|
||||
{
|
||||
(ULONG_PTR *)syscalls,
|
||||
0,
|
||||
ARRAY_SIZE(syscalls),
|
||||
arguments
|
||||
};
|
||||
|
||||
static NTSTATUS init( void *args )
|
||||
{
|
||||
#ifdef _WIN64
|
||||
|
@ -77,8 +69,7 @@ static NTSTATUS init( void *args )
|
|||
zero_bits = (ULONG_PTR)info.HighestUserAddress | 0x7fffffff;
|
||||
}
|
||||
#endif
|
||||
|
||||
KeServiceDescriptorTable[1] = syscall_table;
|
||||
KeAddSystemServiceTable( syscalls, NULL, ARRAY_SIZE(syscalls), arguments, 1 );
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@ typedef NTSTATUS (*unixlib_entry_t)( void *args );
|
|||
|
||||
extern DECLSPEC_EXPORT const unixlib_entry_t __wine_unix_call_funcs[];
|
||||
extern DECLSPEC_EXPORT const unixlib_entry_t __wine_unix_call_wow64_funcs[];
|
||||
extern DECLSPEC_EXPORT SYSTEM_SERVICE_TABLE KeServiceDescriptorTable[4];
|
||||
|
||||
/* some useful helpers from ntdll */
|
||||
NTSYSAPI const char *ntdll_get_build_dir(void);
|
||||
|
@ -84,6 +83,8 @@ NTSYSAPI void ntdll_set_exception_jmp_buf( __wine_jmp_buf *jmp );
|
|||
} \
|
||||
} while (0);
|
||||
|
||||
NTSYSAPI BOOLEAN KeAddSystemServiceTable( ULONG_PTR *funcs, ULONG_PTR *counters, ULONG limit,
|
||||
BYTE *arguments, ULONG index );
|
||||
NTSYSAPI NTSTATUS KeUserModeCallback( ULONG id, const void *args, ULONG len, void **ret_ptr, ULONG *ret_len );
|
||||
|
||||
/* wide char string functions */
|
||||
|
|
Loading…
Add table
Reference in a new issue