diff --git a/dlls/user.exe16/Makefile.in b/dlls/user.exe16/Makefile.in index 9efa686a165..e5015cbda1e 100644 --- a/dlls/user.exe16/Makefile.in +++ b/dlls/user.exe16/Makefile.in @@ -3,7 +3,7 @@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = user.exe16 -IMPORTS = user32 gdi32 kernel32 kernel ntdll +IMPORTS = mpr user32 gdi32 kernel32 kernel ntdll EXTRADLLFLAGS = -Wb,--subsystem,win16,--main-module,user32.dll,--heap,65520 EXTRARCFLAGS = -O res16 diff --git a/dlls/user.exe16/network.c b/dlls/user.exe16/network.c index 105d0161943..8dc31b16191 100644 --- a/dlls/user.exe16/network.c +++ b/dlls/user.exe16/network.c @@ -30,6 +30,7 @@ #include "windef.h" #include "winbase.h" +#include "winnetwk.h" #include "wine/winnet16.h" #include "wine/debug.h" @@ -306,10 +307,26 @@ WORD WINAPI WNetGetCaps16( WORD capability ) /************************************************************************** * WNetGetUser [USER.516] */ -WORD WINAPI WNetGetUser16( LPCSTR lpName, LPSTR szUser, LPINT16 nBufferSize ) +WORD WINAPI WNetGetUser16( LPSTR szUser, LPINT16 nBufferSize ) { - FIXME( "(%p, %p, %p): stub\n", lpName, szUser, nBufferSize ); - return WN16_NOT_SUPPORTED; + DWORD lpBufferSize, ret; + + if(!szUser || !nBufferSize) return WN16_BAD_POINTER; + + lpBufferSize = *nBufferSize; + ret = WNetGetUserA( NULL, szUser, &lpBufferSize ); + *nBufferSize = lpBufferSize; + + switch (ret) + { + case NO_ERROR: + return WN16_SUCCESS; + case ERROR_MORE_DATA: + return WN16_MORE_DATA; + default: + FIXME("Untranslated return value %d\n", ret); + } + return ret; } diff --git a/dlls/user.exe16/user.exe16.spec b/dlls/user.exe16/user.exe16.spec index 517ced81d35..7094f470df1 100644 --- a/dlls/user.exe16/user.exe16.spec +++ b/dlls/user.exe16/user.exe16.spec @@ -463,7 +463,7 @@ 513 pascal -ret16 WNetGetCaps(word) WNetGetCaps16 514 pascal -ret16 WNetDeviceMode(word) WNetDeviceMode16 515 pascal -ret16 WNetBrowseDialog(word word ptr) WNetBrowseDialog16 -516 pascal -ret16 WNetGetUser(ptr ptr ptr) WNetGetUser16 +516 pascal -ret16 WNetGetUser(ptr ptr) WNetGetUser16 517 pascal -ret16 WNetAddConnection(str str str) WNetAddConnection16 518 pascal -ret16 WNetCancelConnection(str word) WNetCancelConnection16 519 pascal -ret16 WNetGetError(ptr) WNetGetError16 diff --git a/include/wine/winnet16.h b/include/wine/winnet16.h index 8f0486027a6..15b046e5612 100644 --- a/include/wine/winnet16.h +++ b/include/wine/winnet16.h @@ -199,7 +199,7 @@ WORD WINAPI WNetGetCaps16(WORD); * Get User */ -WORD WINAPI WNetGetUser16(LPCSTR,LPSTR,LPINT16); +WORD WINAPI WNetGetUser16(LPSTR,LPINT16); /*