[NETAPI32] Fix NetUserEnum to work on x64

The previous implementation used the resume_handle parameter to return a pointer to the active enumeration context, but resume_handle is a DWORD. To support 64 bit pointers, the enumeration context is inserted into a global linked list and given a unique 32 bit value as identifier for later lookup.
The way the function is implemented, leaking a data structure while the MSDN description does not indicate that, seems a little questionable in general, but that is something that I leave to the original author to investigate.
This commit is contained in:
Timo Kreuzer 2019-03-10 22:19:12 +01:00
parent 61e35141e8
commit be97da34ac
3 changed files with 95 additions and 10 deletions

View file

@ -30,6 +30,9 @@
#include "nbnamecache.h"
#include "netbios.h"
extern LIST_ENTRY g_EnumContextListHead;
extern CRITICAL_SECTION g_EnumContextListLock;
NET_API_STATUS
WINAPI
NetpNtStatusToApiStatus(NTSTATUS Status);