Commit 449b8c7e authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

include: Add RTL_GENERIC_TABLE.

And fix RtlInitializeGenericTable's return type while updating the ntdll functions to use the newly added typedefs. Signed-off-by: 's avatarAlex Henrie <alexhenrie24@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 37a7fab9
...@@ -429,30 +429,31 @@ RtlDeleteSecurityObject( PSECURITY_DESCRIPTOR *ObjectDescriptor ) ...@@ -429,30 +429,31 @@ RtlDeleteSecurityObject( PSECURITY_DESCRIPTOR *ObjectDescriptor )
/****************************************************************************** /******************************************************************************
* RtlInitializeGenericTable [NTDLL.@] * RtlInitializeGenericTable [NTDLL.@]
*/ */
PVOID WINAPI RtlInitializeGenericTable(PVOID pTable, PVOID arg2, PVOID arg3, PVOID arg4, PVOID arg5) void WINAPI RtlInitializeGenericTable(RTL_GENERIC_TABLE *table, PRTL_GENERIC_COMPARE_ROUTINE compare,
PRTL_GENERIC_ALLOCATE_ROUTINE allocate, PRTL_GENERIC_FREE_ROUTINE free,
void *context)
{ {
FIXME("(%p,%p,%p,%p,%p) stub!\n", pTable, arg2, arg3, arg4, arg5); FIXME("(%p, %p, %p, %p, %p) stub!\n", table, compare, allocate, free, context);
return NULL;
} }
/****************************************************************************** /******************************************************************************
* RtlEnumerateGenericTableWithoutSplaying [NTDLL.@] * RtlEnumerateGenericTableWithoutSplaying [NTDLL.@]
*/ */
PVOID RtlEnumerateGenericTableWithoutSplaying(PVOID pTable, PVOID *RestartKey) void * RtlEnumerateGenericTableWithoutSplaying(RTL_GENERIC_TABLE *table, void *previous)
{ {
static int warn_once; static int warn_once;
if (!warn_once++) if (!warn_once++)
FIXME("(%p,%p) stub!\n", pTable, RestartKey); FIXME("(%p, %p) stub!\n", table, previous);
return NULL; return NULL;
} }
/****************************************************************************** /******************************************************************************
* RtlNumberGenericTableElements [NTDLL.@] * RtlNumberGenericTableElements [NTDLL.@]
*/ */
ULONG RtlNumberGenericTableElements(PVOID pTable) ULONG RtlNumberGenericTableElements(RTL_GENERIC_TABLE *table)
{ {
FIXME("(%p) stub!\n", pTable); FIXME("(%p) stub!\n", table);
return 0; return 0;
} }
......
...@@ -146,6 +146,40 @@ typedef struct _FILE_VALID_DATA_LENGTH_INFORMATION ...@@ -146,6 +146,40 @@ typedef struct _FILE_VALID_DATA_LENGTH_INFORMATION
LARGE_INTEGER ValidDataLength; LARGE_INTEGER ValidDataLength;
} FILE_VALID_DATA_LENGTH_INFORMATION, *PFILE_VALID_DATA_LENGTH_INFORMATION; } FILE_VALID_DATA_LENGTH_INFORMATION, *PFILE_VALID_DATA_LENGTH_INFORMATION;
typedef enum _RTL_GENERIC_COMPARE_RESULTS
{
GenericLessThan,
GenericGreaterThan,
GenericEqual
} RTL_GENERIC_COMPARE_RESULTS;
typedef struct _RTL_SPLAY_LINKS
{
struct _RTL_SPLAY_LINKS *Parent;
struct _RTL_SPLAY_LINKS *LeftChild;
struct _RTL_SPLAY_LINKS *RightChild;
} RTL_SPLAY_LINKS, *PRTL_SPLAY_LINKS;
struct _RTL_GENERIC_TABLE;
typedef RTL_GENERIC_COMPARE_RESULTS (WINAPI *PRTL_GENERIC_COMPARE_ROUTINE)(struct _RTL_GENERIC_TABLE *, void *, void *);
typedef void * (WINAPI *PRTL_GENERIC_ALLOCATE_ROUTINE)(struct _RTL_GENERIC_TABLE *, LONG);
typedef void (WINAPI *PRTL_GENERIC_FREE_ROUTINE)(struct _RTL_GENERIC_TABLE *Table, void *);
typedef struct _RTL_GENERIC_TABLE
{
PRTL_SPLAY_LINKS TableRoot;
LIST_ENTRY InsertOrderList;
LIST_ENTRY *OrderedPointer;
ULONG WhichOrderedElement;
ULONG NumberGenericTableElements;
PRTL_GENERIC_COMPARE_ROUTINE CompareRoutine;
PRTL_GENERIC_ALLOCATE_ROUTINE AllocateRoutine;
PRTL_GENERIC_FREE_ROUTINE FreeRoutine;
void *TableContext;
} RTL_GENERIC_TABLE;
typedef RTL_GENERIC_TABLE *PRTL_GENERIC_TABLE;
typedef struct _RTL_BALANCED_LINKS { typedef struct _RTL_BALANCED_LINKS {
struct _RTL_BALANCED_LINKS *Parent; struct _RTL_BALANCED_LINKS *Parent;
struct _RTL_BALANCED_LINKS *LeftChild; struct _RTL_BALANCED_LINKS *LeftChild;
...@@ -157,12 +191,6 @@ typedef RTL_BALANCED_LINKS *PRTL_BALANCED_LINKS; ...@@ -157,12 +191,6 @@ typedef RTL_BALANCED_LINKS *PRTL_BALANCED_LINKS;
struct _RTL_AVL_TABLE; struct _RTL_AVL_TABLE;
typedef enum _RTL_GENERIC_COMPARE_RESULTS {
GenericLessThan,
GenericGreaterThan,
GenericEqual
} RTL_GENERIC_COMPARE_RESULTS;
typedef RTL_GENERIC_COMPARE_RESULTS (WINAPI *PRTL_AVL_COMPARE_ROUTINE)(struct _RTL_AVL_TABLE *, void *, void *); typedef RTL_GENERIC_COMPARE_RESULTS (WINAPI *PRTL_AVL_COMPARE_ROUTINE)(struct _RTL_AVL_TABLE *, void *, void *);
typedef void * (WINAPI *PRTL_AVL_ALLOCATE_ROUTINE)(struct _RTL_AVL_TABLE *, LONG); typedef void * (WINAPI *PRTL_AVL_ALLOCATE_ROUTINE)(struct _RTL_AVL_TABLE *, LONG);
......
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