From bb1984e6bd17ecb7c718a58df4262742ff266f38 Mon Sep 17 00:00:00 2001
From: Ulrich Weigand <weigand@informatik.uni-erlangen.de>
Date: Sat, 7 Aug 1999 14:32:33 +0000
Subject: [PATCH] Separated Win16 (USER) and Win32 (MPR) network routines.
 Moved implementation of MPR to dlls/mpr/. Added proper headers and stubs for
 missing MPR routines.

---
 Makefile.in                    |    2 +
 configure                      |    2 +
 configure.in                   |    1 +
 dlls/Makefile.in               |    1 +
 dlls/mpr/.cvsignore            |    2 +
 dlls/mpr/Makefile.in           |   23 +
 dlls/mpr/auth.c                |   77 +++
 {relay32 => dlls/mpr}/mpr.spec |   66 +-
 dlls/mpr/mpr_main.c            |   55 ++
 dlls/mpr/multinet.c            |   62 ++
 dlls/mpr/nps.c                 |  110 ++++
 dlls/mpr/pwcache.c             |   80 +++
 dlls/mpr/wnet.c                |  626 +++++++++++++++++++
 include/netspi.h               |  134 ++++
 include/wine/winnet16.h        |  267 ++++++++
 include/winerror.h             |   51 ++
 include/winnetwk.h             |  322 +++++++++-
 include/winuser.h              |    3 -
 include/wnet.h                 |  131 ----
 misc/network.c                 | 1045 ++++++++------------------------
 relay32/.cvsignore             |    1 -
 relay32/Makefile.in            |    1 -
 22 files changed, 2056 insertions(+), 1006 deletions(-)
 create mode 100644 dlls/mpr/.cvsignore
 create mode 100644 dlls/mpr/Makefile.in
 create mode 100644 dlls/mpr/auth.c
 rename {relay32 => dlls/mpr}/mpr.spec (63%)
 create mode 100644 dlls/mpr/mpr_main.c
 create mode 100644 dlls/mpr/multinet.c
 create mode 100644 dlls/mpr/nps.c
 create mode 100644 dlls/mpr/pwcache.c
 create mode 100644 dlls/mpr/wnet.c
 create mode 100644 include/netspi.h
 create mode 100644 include/wine/winnet16.h
 delete mode 100644 include/wnet.h

diff --git a/Makefile.in b/Makefile.in
index b8a21116ef7..6d244634b6f 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -39,6 +39,7 @@ LIBSUBDIRS = \
 	dlls/imagehlp \
 	dlls/imm32 \
 	dlls/lzexpand \
+	dlls/mpr \
 	dlls/msacm \
 	dlls/msacm32 \
 	dlls/msnet32 \
@@ -130,6 +131,7 @@ LIBOBJS = \
 	dlls/imagehlp/imagehlp.o \
 	dlls/imm32/imm32.o \
 	dlls/lzexpand/lzexpand.o \
+	dlls/mpr/mpr.o \
 	dlls/msacm/msacm.o \
 	dlls/msacm32/msacm32.o \
 	dlls/msnet32/msnet32.o \
diff --git a/configure b/configure
index 04fbc2ccf28..25ac0efe7b5 100755
--- a/configure
+++ b/configure
@@ -5473,6 +5473,7 @@ dlls/dciman32/Makefile
 dlls/imagehlp/Makefile
 dlls/imm32/Makefile
 dlls/lzexpand/Makefile
+dlls/mpr/Makefile
 dlls/msacm/Makefile
 dlls/msacm32/Makefile
 dlls/msnet32/Makefile
@@ -5659,6 +5660,7 @@ dlls/dciman32/Makefile
 dlls/imagehlp/Makefile
 dlls/imm32/Makefile
 dlls/lzexpand/Makefile
+dlls/mpr/Makefile
 dlls/msacm/Makefile
 dlls/msacm32/Makefile
 dlls/msnet32/Makefile
diff --git a/configure.in b/configure.in
index 5ad2c49ebc6..d61acfbaad8 100644
--- a/configure.in
+++ b/configure.in
@@ -802,6 +802,7 @@ dlls/dciman32/Makefile
 dlls/imagehlp/Makefile
 dlls/imm32/Makefile
 dlls/lzexpand/Makefile
+dlls/mpr/Makefile
 dlls/msacm/Makefile
 dlls/msacm32/Makefile
 dlls/msnet32/Makefile
diff --git a/dlls/Makefile.in b/dlls/Makefile.in
index f100e173144..958eec2eed5 100644
--- a/dlls/Makefile.in
+++ b/dlls/Makefile.in
@@ -8,6 +8,7 @@ SUBDIRS = \
 	imagehlp \
 	imm32 \
 	lzexpand \
+	mpr \
 	msacm \
 	msacm32 \
 	msnet32 \
diff --git a/dlls/mpr/.cvsignore b/dlls/mpr/.cvsignore
new file mode 100644
index 00000000000..7d7523f38da
--- /dev/null
+++ b/dlls/mpr/.cvsignore
@@ -0,0 +1,2 @@
+Makefile
+mpr.spec.c
diff --git a/dlls/mpr/Makefile.in b/dlls/mpr/Makefile.in
new file mode 100644
index 00000000000..7caccfa3e58
--- /dev/null
+++ b/dlls/mpr/Makefile.in
@@ -0,0 +1,23 @@
+DEFS      = @DLLFLAGS@ -D__WINE__
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../..
+SRCDIR    = @srcdir@
+VPATH     = @srcdir@
+MODULE    = mpr
+
+SPEC_SRCS = mpr.spec
+
+C_SRCS = \
+	auth.c \
+	mpr_main.c \
+	multinet.c \
+	nps.c \
+	pwcache.c \
+	wnet.c
+
+all: $(MODULE).o
+
+@MAKE_RULES@
+
+### Dependencies:
+
diff --git a/dlls/mpr/auth.c b/dlls/mpr/auth.c
new file mode 100644
index 00000000000..356f816b8e3
--- /dev/null
+++ b/dlls/mpr/auth.c
@@ -0,0 +1,77 @@
+/*
+ * MPR Authentication and Logon functions
+ */
+
+#include "winbase.h"
+#include "winnetwk.h"
+#include "debugtools.h"
+
+DEFAULT_DEBUG_CHANNEL(mpr)
+
+
+/*****************************************************************
+ *  WNetLogoffA [MPR.89]
+ */
+DWORD WINAPI WNetLogoffA( LPCSTR lpProvider, HWND hwndOwner )
+{
+    FIXME( "(%s, %04x): stub\n", debugstr_a(lpProvider), hwndOwner );
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
+/*****************************************************************
+ *  WNetLogoffW [MPR.90]
+ */
+DWORD WINAPI WNetLogoffW( LPCWSTR lpProvider, HWND hwndOwner )
+{
+    FIXME( "(%s, %04x): stub\n", debugstr_w(lpProvider), hwndOwner );
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
+/*****************************************************************
+ *  WNetLogonA [MPR.91]
+ */
+DWORD WINAPI WNetLogonA( LPCSTR lpProvider, HWND hwndOwner )
+{
+    FIXME( "(%s, %04x): stub\n", debugstr_a(lpProvider), hwndOwner );
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
+/*****************************************************************
+ *  WNetLogonW [MPR.91]
+ */
+DWORD WINAPI WNetLogonW( LPCWSTR lpProvider, HWND hwndOwner )
+{
+    FIXME( "(%s, %04x): stub\n", debugstr_w(lpProvider), hwndOwner );
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
+/*****************************************************************
+ *  WNetVerifyPasswordA [MPR.91]
+ */
+DWORD WINAPI WNetVerifyPasswordA( LPCSTR lpszPassword, BOOL *pfMatch )
+{
+    FIXME( "(%p, %p): stub\n", lpszPassword, pfMatch );
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
+/*****************************************************************
+ *  WNetVerifyPasswordW [MPR.91]
+ */
+DWORD WINAPI WNetVerifyPasswordW( LPCWSTR lpszPassword, BOOL *pfMatch )
+{
+    FIXME( "(%p, %p): stub\n", lpszPassword, pfMatch );
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
diff --git a/relay32/mpr.spec b/dlls/mpr/mpr.spec
similarity index 63%
rename from relay32/mpr.spec
rename to dlls/mpr/mpr.spec
index b1482a67d4f..244046881f3 100644
--- a/relay32/mpr.spec
+++ b/dlls/mpr/mpr.spec
@@ -27,20 +27,20 @@ type win32
 0024 stdcall MPR_Free(ptr) MPR_Free
 0025 stdcall MPR_25(ptr long) _MPR_25
 0026 stdcall MultinetGetConnectionPerformanceA(ptr ptr) MultinetGetConnectionPerformanceA
-0027 stub MultinetGetConnectionPerformanceW
+0027 stdcall MultinetGetConnectionPerformanceW(ptr ptr) MultinetGetConnectionPerformanceW
 0028 stdcall MultinetGetErrorTextA(long ptr long)MultinetGetErrorTextA
 0029 stdcall MultinetGetErrorTextW(long ptr long)MultinetGetErrorTextW
-0030 stub NPSAuthenticationDialogA
-0031 stub NPSCopyStringA
-0032 stub NPSDeviceGetNumberA
-0033 stub NPSDeviceGetStringA
-0034 stdcall NPSGetProviderHandleA(long) NPSGetProviderHandleA
+0030 stdcall NPSAuthenticationDialogA(ptr) NPSAuthenticationDialogA
+0031 stdcall NPSCopyStringA(str ptr ptr) NPSCopyStringA
+0032 stdcall NPSDeviceGetNumberA(str ptr ptr) NPSDeviceGetNumberA
+0033 stdcall NPSDeviceGetStringA(long long ptr long) NPSDeviceGetStringA
+0034 stdcall NPSGetProviderHandleA(ptr) NPSGetProviderHandleA
 0035 stdcall NPSGetProviderNameA(long ptr) NPSGetProviderNameA
 0036 stdcall NPSGetSectionNameA(long ptr) NPSGetSectionNameA
-0037 stub NPSNotifyGetContextA
-0038 stub NPSNotifyRegisterA
-0039 stub NPSSetCustomTextA
-0040 stub NPSSetExtendedErrorA
+0037 stdcall NPSNotifyGetContextA(ptr) NPSNotifyGetContextA
+0038 stdcall NPSNotifyRegisterA(long ptr) NPSNotifyRegisterA
+0039 stdcall NPSSetCustomTextA(str) NPSSetCustomTextA
+0040 stdcall NPSSetExtendedErrorA(long str) NPSSetExtendedErrorA
 0041 stub PwdChangePasswordA
 0042 stub PwdChangePasswordW
 0043 stub PwdGetPasswordStatusA
@@ -58,16 +58,16 @@ type win32
 0055 stdcall WNetCancelConnection2W(wstr long long) WNetCancelConnection2W
 0056 stdcall WNetCancelConnectionA(str long) WNetCancelConnectionA
 0057 stdcall WNetCancelConnectionW(wstr long) WNetCancelConnectionW
-0058 stub WNetCloseEnum
+0058 stdcall WNetCloseEnum(long) WNetCloseEnum
 0059 stdcall WNetConnectionDialog1A(ptr) WNetConnectionDialog1A
 0060 stdcall WNetConnectionDialog1W(ptr) WNetConnectionDialog1W
 0061 stdcall WNetConnectionDialog(long long) WNetConnectionDialog
-0062 stub WNetDisconnectDialog1A
-0063 stub WNetDisconnectDialog1W
-0064 stub WNetDisconnectDialog
+0062 stdcall WNetDisconnectDialog1A(ptr) WNetDisconnectDialog1A
+0063 stdcall WNetDisconnectDialog1W(ptr) WNetDisconnectDialog1W
+0064 stdcall WNetDisconnectDialog(long long) WNetDisconnectDialog
 0065 stdcall WNetEnumCachedPasswords(str long long ptr) WNetEnumCachedPasswords
-0066 stub WNetEnumResourceA
-0067 stub WNetEnumResourceW
+0066 stdcall WNetEnumResourceA(long ptr ptr ptr) WNetEnumResourceA
+0067 stdcall WNetEnumResourceW(long ptr ptr ptr) WNetEnumResourceW
 0068 stub WNetFormatNetworkNameA
 0069 stub WNetFormatNetworkNameW
 0070 stdcall WNetGetCachedPassword(ptr long ptr ptr long) WNetGetCachedPassword
@@ -75,35 +75,35 @@ type win32
 0072 stdcall WNetGetConnectionW(wstr ptr ptr) WNetGetConnectionW
 0073 stub WNetGetHomeDirectoryA
 0074 stub WNetGetHomeDirectoryW
-0075 stub WNetGetLastErrorA
-0076 stub WNetGetLastErrorW
-0077 stub WNetGetNetworkInformationA
-0078 stub WNetGetNetworkInformationW
+0075 stdcall WNetGetLastErrorA(ptr ptr long ptr long) WNetGetLastErrorA
+0076 stdcall WNetGetLastErrorW(ptr ptr long ptr long) WNetGetLastErrorW
+0077 stdcall WNetGetNetworkInformationA(str ptr) WNetGetNetworkInformationA
+0078 stdcall WNetGetNetworkInformationW(wstr ptr) WNetGetNetworkInformationW
 0079 stdcall WNetGetProviderNameA(long ptr ptr) WNetGetProviderNameA
 0080 stdcall WNetGetProviderNameW(long ptr ptr) WNetGetProviderNameW
 0081 stdcall WNetGetResourceInformationA(ptr ptr ptr ptr) WNetGetResourceInformationA
-0082 stub WNetGetResourceInformationW
-0083 stub WNetGetResourceParentA
-0084 stub WNetGetResourceParentW
+0082 stdcall WNetGetResourceInformationW(ptr ptr ptr ptr) WNetGetResourceInformationW
+0083 stdcall WNetGetResourceParentA(ptr ptr ptr) WNetGetResourceParentA
+0084 stdcall WNetGetResourceParentW(ptr ptr ptr) WNetGetResourceParentW
 0085 stdcall WNetGetUniversalNameA (str long ptr ptr) WNetGetUniversalNameA
 0086 stdcall WNetGetUniversalNameW (wstr long ptr ptr) WNetGetUniversalNameW
 0087 stdcall WNetGetUserA(str ptr ptr) WNetGetUserA
 0088 stdcall WNetGetUserW(wstr wstr ptr) WNetGetUserW
-0089 stub WNetLogoffA
-0090 stub WNetLogoffW
-0091 stub WNetLogonA
-0092 stub WNetLogonW
+0089 stdcall WNetLogoffA(str long) WNetLogoffA
+0090 stdcall WNetLogoffW(wstr long) WNetLogoffW
+0091 stdcall WNetLogonA(str long) WNetLogonA
+0092 stdcall WNetLogonW(wstr long) WNetLogonW
 0093 stdcall WNetOpenEnumA(long long long ptr ptr) WNetOpenEnumA
 0094 stdcall WNetOpenEnumW(long long long ptr ptr) WNetOpenEnumW
 0095 stdcall WNetRemoveCachedPassword(long long long) WNetRemoveCachedPassword
-0096 stub WNetRestoreConnectionA
-0097 stub WNetRestoreConnectionW
-0098 stub WNetSetConnectionA
-0099 stub WNetSetConnectionW
+0096 stdcall WNetRestoreConnectionA(long str) WNetRestoreConnectionA
+0097 stdcall WNetRestoreConnectionW(long wstr) WNetRestoreConnectionW
+0098 stdcall WNetSetConnectionA(str long ptr) WNetSetConnectionA
+0099 stdcall WNetSetConnectionW(wstr long ptr) WNetSetConnectionW
 0100 stdcall WNetUseConnectionA(long ptr str str long str ptr ptr) WNetUseConnectionA 
 0101 stdcall WNetUseConnectionW(long ptr wstr wstr long wstr ptr ptr) WNetUseConnectionW
-0102 stub WNetVerifyPasswordA
-0103 stub WNetVerifyPasswordW 
+0102 stdcall WNetVerifyPasswordA(str ptr) WNetVerifyPasswordA
+0103 stdcall WNetVerifyPasswordW(wstr ptr) WNetVerifyPasswordW
 
 #additions, not in win95 mpr.dll
 0104 stub WNetRestoreConnection
diff --git a/dlls/mpr/mpr_main.c b/dlls/mpr/mpr_main.c
new file mode 100644
index 00000000000..6d136df220c
--- /dev/null
+++ b/dlls/mpr/mpr_main.c
@@ -0,0 +1,55 @@
+/*
+ * MPR undocumented functions
+ */
+
+#include "winbase.h"
+#include "winnetwk.h"
+#include "heap.h"
+#include "debugtools.h"
+
+DEFAULT_DEBUG_CHANNEL(mpr)
+
+ /* 
+  * FIXME: The following routines should use a private heap ...
+  */
+
+/*****************************************************************
+ *  MPR_Alloc  [MPR.22]
+ */
+LPVOID WINAPI MPR_Alloc( DWORD dwSize )
+{
+    return HeapAlloc( SystemHeap, HEAP_ZERO_MEMORY, dwSize );
+}
+
+/*****************************************************************
+ *  MPR_ReAlloc  [MPR.23]
+ */
+LPVOID WINAPI MPR_ReAlloc( LPVOID lpSrc, DWORD dwSize )
+{
+    if ( lpSrc )
+        return HeapReAlloc( SystemHeap, HEAP_ZERO_MEMORY, lpSrc, dwSize );
+    else
+        return HeapAlloc( SystemHeap, HEAP_ZERO_MEMORY, dwSize );
+}
+
+/*****************************************************************
+ *  MPR_Free  [MPR.24]
+ */
+BOOL WINAPI MPR_Free( LPVOID lpMem )
+{
+    if ( lpMem )
+        return HeapFree( SystemHeap, 0, lpMem );
+    else
+        return FALSE;
+}
+
+/*****************************************************************
+ *  [MPR.25]
+ */
+BOOL WINAPI _MPR_25( LPBYTE lpMem, INT len )
+{
+    FIXME( "(%p, %d): stub\n", lpMem, len );
+
+    return FALSE;
+}
+
diff --git a/dlls/mpr/multinet.c b/dlls/mpr/multinet.c
new file mode 100644
index 00000000000..750b10777e7
--- /dev/null
+++ b/dlls/mpr/multinet.c
@@ -0,0 +1,62 @@
+/*
+ * MPR Multinet functions
+ */
+
+#include "winbase.h"
+#include "winnetwk.h"
+#include "debugtools.h"
+
+DEFAULT_DEBUG_CHANNEL(mpr)
+
+
+/*****************************************************************
+ *     MultinetGetConnectionPerformanceA [MPR.25]
+ *
+ * RETURNS
+ *    Success: NO_ERROR
+ *    Failure: ERROR_NOT_SUPPORTED, ERROR_NOT_CONNECTED,
+ *             ERROR_NO_NET_OR_BAD_PATH, ERROR_BAD_DEVICE,
+ *             ERROR_BAD_NET_NAME, ERROR_INVALID_PARAMETER, 
+ *             ERROR_NO_NETWORK, ERROR_EXTENDED_ERROR
+ */
+DWORD WINAPI MultinetGetConnectionPerformanceA(
+	LPNETRESOURCEA lpNetResource,
+	LPNETCONNECTINFOSTRUCT lpNetConnectInfoStruct )
+{
+    FIXME( "(%p, %p): stub\n", lpNetResource, lpNetConnectInfoStruct );
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
+/*****************************************************************
+ *     MultinetGetConnectionPerformanceW [MPR.26]
+ */
+DWORD WINAPI MultinetGetConnectionPerformanceW(
+	LPNETRESOURCEW lpNetResource,
+	LPNETCONNECTINFOSTRUCT lpNetConnectInfoStruct )
+{
+    FIXME( "(%p, %p): stub\n", lpNetResource, lpNetConnectInfoStruct );
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
+/*****************************************************************
+ *  MultinetGetErrorTextA [MPR.27]
+ */
+DWORD WINAPI MultinetGetErrorTextA( DWORD x, DWORD y, DWORD z )
+{
+    FIXME( "(%lx, %lx, %lx): stub\n", x, y, z );
+    return 0;
+}
+
+/*****************************************************************
+ *  MultinetGetErrorTextW [MPR.28]
+ */
+DWORD WINAPI MultinetGetErrorTextW( DWORD x, DWORD y, DWORD z )
+{
+    FIXME( "(%lx, %lx, %lx ): stub\n", x, y, z );
+    return 0;
+}
+
diff --git a/dlls/mpr/nps.c b/dlls/mpr/nps.c
new file mode 100644
index 00000000000..fc7aad884bd
--- /dev/null
+++ b/dlls/mpr/nps.c
@@ -0,0 +1,110 @@
+/*
+ * MPR Network Provider Services functions
+ */
+
+#include "winbase.h"
+#include "winnetwk.h"
+#include "netspi.h"
+#include "debugtools.h"
+
+DEFAULT_DEBUG_CHANNEL(mpr)
+
+
+/*****************************************************************
+ *  NPSAuthenticationDialogA [MPR.30]
+ */
+DWORD WINAPI NPSAuthenticationDialogA( LPAUTHDLGSTRUCTA lpAuthDlgStruct )
+{
+    FIXME( "(%p): stub\n", lpAuthDlgStruct );
+    return WN_NOT_SUPPORTED;
+}
+
+/*****************************************************************
+ *  NPSGetProviderHandleA [MPR.34]
+ */
+DWORD WINAPI NPSGetProviderHandleA( PHPROVIDER phProvider )
+{
+    FIXME( "(%p): stub\n", phProvider );
+    return WN_NOT_SUPPORTED;
+}
+
+/*****************************************************************
+ *  NPSGetProviderNameA [MPR.35]
+ */
+DWORD WINAPI NPSGetProviderNameA( HPROVIDER hProvider, LPCSTR *lpszProviderName )
+{
+    FIXME( "(%p, %p): stub\n", hProvider, lpszProviderName );
+    return WN_NOT_SUPPORTED;
+}
+
+/*****************************************************************
+ *  NPSGetSectionNameA [MPR.36]
+ */
+DWORD WINAPI NPSGetSectionNameA( HPROVIDER hProvider, LPCSTR *lpszSectionName )
+{
+    FIXME( "(%p, %p): stub\n", hProvider, lpszSectionName );
+    return WN_NOT_SUPPORTED;
+}
+
+/*****************************************************************
+ *  NPSSetExtendedErrorA [MPR.40]
+ */
+DWORD WINAPI NPSSetExtendedErrorA( DWORD NetSpecificError, LPSTR lpExtendedErrorText )
+{
+    FIXME( "(%08lx, %s): stub\n", NetSpecificError, debugstr_a(lpExtendedErrorText) );
+    return WN_NOT_SUPPORTED;
+}
+
+/*****************************************************************
+ *  NPSSetCustomTextA [MPR.39]
+ */
+VOID WINAPI NPSSetCustomTextA( LPSTR lpCustomErrorText )
+{
+    FIXME( "(%s): stub\n", debugstr_a(lpCustomErrorText) );
+}
+
+/*****************************************************************
+ *  NPSCopyStringA [MPR.31]
+ */
+DWORD WINAPI NPSCopyStringA( LPCSTR lpString, LPVOID lpBuffer, LPDWORD lpdwBufferSize )
+{
+    FIXME( "(%s, %p, %p): stub\n", debugstr_a(lpString), lpBuffer, lpdwBufferSize );
+    return WN_NOT_SUPPORTED;
+}
+
+/*****************************************************************
+ *  NPSDeviceGetNumberA [MPR.32]
+ */
+DWORD WINAPI NPSDeviceGetNumberA( LPSTR lpLocalName, LPDWORD lpdwNumber, LPDWORD lpdwType )
+{
+    FIXME( "(%s, %p, %p): stub\n", debugstr_a(lpLocalName), lpdwNumber, lpdwType );
+    return WN_NOT_SUPPORTED;
+}
+
+/*****************************************************************
+ *  NPSDeviceGetStringA [MPR.33]
+ */
+DWORD WINAPI NPSDeviceGetStringA( DWORD dwNumber, DWORD dwType, LPSTR lpLocalName, LPDWORD lpdwBufferSize )
+{
+    FIXME( "(%ld, %ld, %p, %p): stub\n", dwNumber, dwType, lpLocalName, lpdwBufferSize );
+    return WN_NOT_SUPPORTED;
+}
+
+/*****************************************************************
+ *  NPSNotifyRegisterA [MPR.38]
+ */
+DWORD WINAPI NPSNotifyRegisterA( enum NOTIFYTYPE NotifyType, NOTIFYCALLBACK pfNotifyCallBack )
+{
+    FIXME( "(%d, %p): stub\n", NotifyType, pfNotifyCallBack );
+    return WN_NOT_SUPPORTED;
+}
+
+/*****************************************************************
+ *  NPSNotifyGetContextA [MPR.37]
+ */
+LPVOID WINAPI NPSNotifyGetContextA( NOTIFYCALLBACK pfNotifyCallBack )
+{
+    FIXME( "(%p): stub\n", pfNotifyCallBack );
+    return NULL;
+}
+
diff --git a/dlls/mpr/pwcache.c b/dlls/mpr/pwcache.c
new file mode 100644
index 00000000000..d57c19f2532
--- /dev/null
+++ b/dlls/mpr/pwcache.c
@@ -0,0 +1,80 @@
+/*
+ * MPR Password Cache functions
+ */
+
+#include "winbase.h"
+#include "winnetwk.h"
+#include "debugtools.h"
+
+DEFAULT_DEBUG_CHANNEL(mpr)
+
+
+/**************************************************************************
+ * WNetCachePassword [MPR.52]  Saves password in cache
+ *
+ * RETURNS
+ *    Success: WN_SUCCESS
+ *    Failure: WN_ACCESS_DENIED, WN_BAD_PASSWORD, WN_BADVALUE, WN_NET_ERROR,
+ *             WN_NOT_SUPPORTED, WN_OUT_OF_MEMORY
+ */
+DWORD WINAPI WNetCachePassword(
+    LPSTR pbResource, /* [in] Name of workgroup, computer, or resource */
+    WORD cbResource,  /* [in] Size of name */
+    LPSTR pbPassword, /* [in] Buffer containing password */
+    WORD cbPassword,  /* [in] Size of password */
+    BYTE nType)       /* [in] Type of password to cache */
+{
+    FIXME( "(%s, %d, %p, %d, %d): stub\n", 
+           debugstr_a(pbResource), cbResource, pbPassword, cbPassword, nType );
+
+    return WN_SUCCESS;
+}
+
+/*****************************************************************
+ *  WNetRemoveCachedPassword [MPR.95]
+ */
+UINT WINAPI WNetRemoveCachedPassword( LPSTR pbResource, WORD cbResource, 
+                                      BYTE nType )
+{
+    FIXME( "(%s, %d, %d): stub\n", 
+           debugstr_a(pbResource), cbResource, nType );
+
+    return WN_SUCCESS;
+}
+
+/*****************************************************************
+ * WNetGetCachedPassword [MPR.69]  Retrieves password from cache
+ *
+ * RETURNS
+ *    Success: WN_SUCCESS
+ *    Failure: WN_ACCESS_DENIED, WN_BAD_PASSWORD, WN_BAD_VALUE, 
+ *             WN_NET_ERROR, WN_NOT_SUPPORTED, WN_OUT_OF_MEMORY
+ */
+DWORD WINAPI WNetGetCachedPassword(
+    LPSTR pbResource,   /* [in]  Name of workgroup, computer, or resource */
+    WORD cbResource,    /* [in]  Size of name */
+    LPSTR pbPassword,   /* [out] Buffer to receive password */
+    LPWORD pcbPassword, /* [out] Receives size of password */
+    BYTE nType)         /* [in]  Type of password to retrieve */
+{
+    FIXME( "(%s, %d, %p, %p, %d): stub\n",
+           debugstr_a(pbResource), cbResource, pbPassword, pcbPassword, nType );
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
+/*******************************************************************
+ * WNetEnumCachedPasswords [MPR.61]
+ */
+UINT WINAPI WNetEnumCachedPasswords( LPSTR pbPrefix, WORD cbPrefix,
+                                     BYTE nType, FARPROC enumPasswordProc )
+{
+    FIXME( "(%p, %d, %d, %p): stub\n",
+           pbPrefix, cbPrefix, nType, enumPasswordProc );
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
+
diff --git a/dlls/mpr/wnet.c b/dlls/mpr/wnet.c
new file mode 100644
index 00000000000..66c534ccbbb
--- /dev/null
+++ b/dlls/mpr/wnet.c
@@ -0,0 +1,626 @@
+/*
+ * MPR WNet functions
+ */
+
+#include <ctype.h>
+#include <string.h>
+#include <sys/types.h>
+#include <pwd.h>
+#include <unistd.h>
+
+#include "winbase.h"
+#include "winnetwk.h"
+#include "drive.h"
+#include "heap.h"
+#include "debugtools.h"
+
+DEFAULT_DEBUG_CHANNEL(mpr)
+
+
+/*
+ * Browsing Functions
+ */
+
+/*********************************************************************
+ * WNetOpenEnumA [MPR.92]
+ */
+DWORD WINAPI WNetOpenEnumA( DWORD dwScope, DWORD dwType, DWORD dwUsage,
+                            LPNETRESOURCEA lpNet, LPHANDLE lphEnum )
+{
+    FIXME( "(%08lX, %08lX, %08lX, %p, %p): stub\n",
+	    dwScope, dwType, dwUsage, lpNet, lphEnum );
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetOpenEnumW [MPR.93]
+ */
+DWORD WINAPI WNetOpenEnumW( DWORD dwScope, DWORD dwType, DWORD dwUsage,
+                            LPNETRESOURCEW lpNet, LPHANDLE lphEnum )
+{
+   FIXME( "(%08lX, %08lX, %08lX, %p, %p): stub\n",
+          dwScope, dwType, dwUsage, lpNet, lphEnum );
+
+   SetLastError(WN_NO_NETWORK);
+   return WN_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetEnumResourceA [MPR.66]
+ */
+DWORD WINAPI WNetEnumResourceA( HANDLE hEnum, LPDWORD lpcCount, 
+                                LPVOID lpBuffer, LPDWORD lpBufferSize )
+{
+    FIXME( "(%04X, %p, %p, %p): stub\n", 
+	    hEnum, lpcCount, lpBuffer, lpBufferSize );
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetEnumResourceW [MPR.67]
+ */
+DWORD WINAPI WNetEnumResourceW( HANDLE hEnum, LPDWORD lpcCount, 
+                                LPVOID lpBuffer, LPDWORD lpBufferSize )
+{
+    FIXME( "(%04X, %p, %p, %p): stub\n", 
+	    hEnum, lpcCount, lpBuffer, lpBufferSize );
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetCloseEnum [MPR.58]
+ */
+DWORD WINAPI WNetCloseEnum( HANDLE hEnum )
+{
+    FIXME( "(%04X): stub\n", hEnum );
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetGetResourceInformationA [MPR.80]
+ */
+DWORD WINAPI WNetGetResourceInformationA( LPNETRESOURCEA lpNetResource, 
+                                          LPVOID lpBuffer, LPDWORD cbBuffer, 
+                                          LPSTR *lplpSystem )
+{
+    FIXME( "(%p, %p, %p, %p): stub\n",
+           lpNetResource, lpBuffer, cbBuffer, lplpSystem );
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetGetResourceInformationW [MPR.80]
+ */
+DWORD WINAPI WNetGetResourceInformationW( LPNETRESOURCEW lpNetResource, 
+                                          LPVOID lpBuffer, LPDWORD cbBuffer, 
+                                          LPWSTR *lplpSystem )
+{
+    FIXME( "(%p, %p, %p, %p): stub\n",
+           lpNetResource, lpBuffer, cbBuffer, lplpSystem );
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetGetResourceParentA [MPR.83]
+ */
+DWORD WINAPI WNetGetResourceParentA( LPNETRESOURCEA lpNetResource,
+                                     LPVOID lpBuffer, LPDWORD lpBufferSize )
+{
+    FIXME( "(%p, %p, %p): stub\n", 
+           lpNetResource, lpBuffer, lpBufferSize );
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetGetResourceParentW [MPR.84]
+ */
+DWORD WINAPI WNetGetResourceParentW( LPNETRESOURCEW lpNetResource,
+                                     LPVOID lpBuffer, LPDWORD lpBufferSize )
+{
+    FIXME( "(%p, %p, %p): stub\n", 
+           lpNetResource, lpBuffer, lpBufferSize );
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
+
+
+/*
+ * Connection Functions
+ */
+
+/*********************************************************************
+ *  WNetAddConnectionA [MPR.50] 
+ */
+DWORD WINAPI WNetAddConnectionA( LPCSTR lpRemoteName, LPCSTR lpPassword,
+                                 LPCSTR lpLocalName )
+{
+    FIXME( "(%s, %p, %s): stub\n", 
+           debugstr_a(lpRemoteName), lpPassword, debugstr_a(lpLocalName) );
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
+/*********************************************************************
+ *  WNetAddConnectionW [MPR.51] 
+ */
+DWORD WINAPI WNetAddConnectionW( LPCWSTR lpRemoteName, LPCWSTR lpPassword,
+                                 LPCWSTR lpLocalName )
+{
+    FIXME( "(%s, %p, %s): stub\n", 
+           debugstr_w(lpRemoteName), lpPassword, debugstr_w(lpLocalName) );
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
+/*********************************************************************
+ *  WNetAddConnection2A [MPR.46] 
+ */
+DWORD WINAPI WNetAddConnection2A( LPNETRESOURCEA lpNetResource,
+                                  LPCSTR lpPassword, LPCSTR lpUserID, 
+                                  DWORD dwFlags )
+{
+    FIXME( "(%p, %p, %s, 0x%08lX): stub\n", 
+           lpNetResource, lpPassword, debugstr_a(lpUserID), dwFlags );
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetAddConnection2W [MPR.47]
+ */
+DWORD WINAPI WNetAddConnection2W( LPNETRESOURCEW lpNetResource,
+                                  LPCWSTR lpPassword, LPCWSTR lpUserID, 
+                                  DWORD dwFlags )
+{
+    FIXME( "(%p, %p, %s, 0x%08lX): stub\n", 
+           lpNetResource, lpPassword, debugstr_w(lpUserID), dwFlags );
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetAddConnection3A [MPR.48]
+ */
+DWORD WINAPI WNetAddConnection3A( HWND hwndOwner, LPNETRESOURCEA lpNetResource,
+                                  LPCSTR lpPassword, LPCSTR lpUserID, 
+                                  DWORD dwFlags )
+{
+    FIXME( "(%04x, %p, %p, %s, 0x%08lX), stub\n", 
+           hwndOwner, lpNetResource, lpPassword, debugstr_a(lpUserID), dwFlags );
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetAddConnection3W [MPR.49]
+ */
+DWORD WINAPI WNetAddConnection3W( HWND hwndOwner, LPNETRESOURCEW lpNetResource,
+                                  LPCWSTR lpPassword, LPCWSTR lpUserID, 
+                                  DWORD dwFlags )
+{
+    FIXME( "(%04x, %p, %p, %s, 0x%08lX), stub\n", 
+           hwndOwner, lpNetResource, lpPassword, debugstr_w(lpUserID), dwFlags );
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+} 
+
+/*****************************************************************
+ *  WNetUseConnectionA [MPR.100]
+ */
+DWORD WINAPI WNetUseConnectionA( HWND hwndOwner, LPNETRESOURCEA lpNetResource,
+                                 LPCSTR lpPassword, LPCSTR lpUserID, DWORD dwFlags,
+                                 LPSTR lpAccessName, LPDWORD lpBufferSize, 
+                                 LPDWORD lpResult )
+{
+    FIXME( "(%04x, %p, %p, %s, 0x%08lX, %s, %p, %p), stub\n", 
+           hwndOwner, lpNetResource, lpPassword, debugstr_a(lpUserID), dwFlags,
+           debugstr_a(lpAccessName), lpBufferSize, lpResult );
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
+/*****************************************************************
+ *  WNetUseConnectionW [MPR.101]
+ */
+DWORD WINAPI WNetUseConnectionW( HWND hwndOwner, LPNETRESOURCEW lpNetResource,
+                                 LPCWSTR lpPassword, LPCWSTR lpUserID, DWORD dwFlags,
+                                 LPWSTR lpAccessName, LPDWORD lpBufferSize,
+                                 LPDWORD lpResult )
+{
+    FIXME( "(%04x, %p, %p, %s, 0x%08lX, %s, %p, %p), stub\n", 
+           hwndOwner, lpNetResource, lpPassword, debugstr_w(lpUserID), dwFlags,
+           debugstr_w(lpAccessName), lpBufferSize, lpResult );
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
+/*********************************************************************
+ *  WNetCancelConnectionA [MPR.55]
+ */
+DWORD WINAPI WNetCancelConnectionA( LPCSTR lpName, BOOL fForce )
+{
+    FIXME( "(%s, %d), stub\n", debugstr_a(lpName), fForce );
+
+    return WN_SUCCESS;
+}
+
+/*********************************************************************
+ *  WNetCancelConnectionW [MPR.56]
+ */
+DWORD WINAPI WNetCancelConnectionW( LPCWSTR lpName, BOOL fForce ) 
+{
+    FIXME( "(%s, %d), stub\n", debugstr_w(lpName), fForce );
+
+    return WN_SUCCESS;
+}
+
+/*********************************************************************
+ *  WNetCancelConnection2A [MPR.53]
+ */
+DWORD WINAPI WNetCancelConnection2A( LPCSTR lpName, DWORD dwFlags, BOOL fForce ) 
+{
+    FIXME( "(%s, %08lX, %d), stub\n", debugstr_a(lpName), dwFlags, fForce );
+
+    return WN_SUCCESS;
+}
+
+/*********************************************************************
+ *  WNetCancelConnection2W [MPR.54]
+ */
+DWORD WINAPI WNetCancelConnection2W( LPCWSTR lpName, DWORD dwFlags, BOOL fForce ) 
+{
+    FIXME( "(%s, %08lX, %d), stub\n", debugstr_w(lpName), dwFlags, fForce );
+
+    return WN_SUCCESS;
+}
+
+/*****************************************************************
+ *  WNetRestoreConnectionA [MPR.96]
+ */
+DWORD WINAPI WNetRestoreConnectionA( HWND hwndOwner, LPSTR lpszDevice )
+{
+    FIXME( "(%04X, %s), stub\n", hwndOwner, debugstr_a(lpszDevice) );
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
+/*****************************************************************
+ *  WNetRestoreConnectionW [MPR.97]
+ */
+DWORD WINAPI WNetRestoreConnectionW( HWND hwndOwner, LPWSTR lpszDevice )
+{
+    FIXME( "(%04X, %s), stub\n", hwndOwner, debugstr_w(lpszDevice) );
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
+/**************************************************************************
+ * WNetGetConnectionA [MPR.71]
+ *
+ * RETURNS
+ * - WN_BAD_LOCALNAME     lpLocalName makes no sense
+ * - WN_NOT_CONNECTED     drive is a local drive
+ * - WN_MORE_DATA         buffer isn't big enough
+ * - WN_SUCCESS           success (net path in buffer)  
+ *
+ */
+DWORD WINAPI WNetGetConnectionA( LPCSTR lpLocalName, 
+                                 LPSTR lpRemoteName, LPDWORD lpBufferSize )
+{
+    const char *path;
+
+    TRACE( "local %s\n", lpLocalName );
+    if (lpLocalName[1] == ':')
+    {
+        int drive = toupper(lpLocalName[0]) - 'A';
+        switch(DRIVE_GetType(drive))
+        {
+        case TYPE_INVALID:
+            return WN_BAD_LOCALNAME;
+        case TYPE_NETWORK:
+            path = DRIVE_GetLabel(drive);
+            if (strlen(path) + 1 > *lpBufferSize)
+            {
+                *lpBufferSize = strlen(path) + 1;
+                return WN_MORE_DATA;
+            }
+            strcpy( lpRemoteName, path );
+            *lpBufferSize = strlen(lpRemoteName) + 1;
+            return WN_SUCCESS;
+	case TYPE_FLOPPY:
+	case TYPE_HD:
+	case TYPE_CDROM:
+	  TRACE("file is local\n");
+	  return WN_NOT_CONNECTED;
+	default:
+	    return WN_BAD_LOCALNAME;
+        }
+    }
+    return WN_BAD_LOCALNAME;
+}
+
+/**************************************************************************
+ * WNetGetConnectionW [MPR.72]
+ */
+DWORD WINAPI WNetGetConnectionW( LPCWSTR lpLocalName, 
+                                 LPWSTR lpRemoteName, LPDWORD lpBufferSize )
+{
+    DWORD x;
+    CHAR  buf[200];
+    LPSTR lnA = HEAP_strdupWtoA( GetProcessHeap(), 0, lpLocalName );
+    DWORD ret = WNetGetConnectionA( lnA, buf, &x );
+
+    lstrcpyAtoW( lpRemoteName, buf );
+    *lpBufferSize=lstrlenW( lpRemoteName );
+    HeapFree( GetProcessHeap(), 0, lnA );
+    return ret;
+}
+
+/**************************************************************************
+ * WNetSetConnectionA [MPR.72]
+ */
+DWORD WINAPI WNetSetConnectionA( LPCSTR lpName, DWORD dwProperty, 
+                                 LPVOID pvValue )
+{
+    FIXME( "(%s, %08lX, %p): stub\n", debugstr_a(lpName), dwProperty, pvValue );
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
+/**************************************************************************
+ * WNetSetConnectionW [MPR.72]
+ */
+DWORD WINAPI WNetSetConnectionW( LPCWSTR lpName, DWORD dwProperty, 
+                                 LPVOID pvValue )
+{
+    FIXME( "(%s, %08lX, %p): stub\n", debugstr_w(lpName), dwProperty, pvValue );
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
+/*****************************************************************
+ * WNetGetUniversalNameA [MPR.85]
+ */
+DWORD WINAPI WNetGetUniversalNameA ( LPCSTR lpLocalPath, DWORD dwInfoLevel, 
+                                     LPVOID lpBuffer, LPDWORD lpBufferSize )
+{
+    FIXME( "(%s, 0x%08lX, %p, %p): stub\n", 
+           debugstr_a(lpLocalPath), dwInfoLevel, lpBuffer, lpBufferSize);
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
+/*****************************************************************
+ * WNetGetUniversalNameW [MPR.86]
+ */
+DWORD WINAPI WNetGetUniversalNameW ( LPCWSTR lpLocalPath, DWORD dwInfoLevel, 
+                                     LPVOID lpBuffer, LPDWORD lpBufferSize )
+{
+    FIXME( "(%s, 0x%08lX, %p, %p): stub\n", 
+           debugstr_w(lpLocalPath), dwInfoLevel, lpBuffer, lpBufferSize);
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
+
+
+/*
+ * Other Functions
+ */
+
+/**************************************************************************
+ * WNetGetUserA [MPR.86]
+ *
+ * FIXME: we should not return ourselves, but the owner of the drive lpName
+ */
+DWORD WINAPI WNetGetUserA( LPCSTR lpName, LPSTR lpUserID, LPDWORD lpBufferSize )
+{
+    struct passwd *pwd = getpwuid(getuid());
+
+    FIXME( "(%s, %p, %p): mostly stub\n", 
+           debugstr_a(lpName), lpUserID, lpBufferSize );
+
+    if (pwd)
+    {
+        if ( strlen(pwd->pw_name) + 1 > *lpBufferSize )
+        {
+            *lpBufferSize = strlen(pwd->pw_name) + 1;
+
+            SetLastError(ERROR_MORE_DATA);
+            return ERROR_MORE_DATA;
+        }
+
+	strcpy( lpUserID, pwd->pw_name );
+        *lpBufferSize = strlen(pwd->pw_name) + 1;
+        return WN_SUCCESS;
+    }
+
+    /* FIXME: wrong return value */
+    SetLastError(ERROR_NO_NETWORK);
+    return ERROR_NO_NETWORK;
+}
+
+/*****************************************************************
+ * WNetGetUserW [MPR.87]
+ */
+DWORD WINAPI WNetGetUserW( LPCWSTR lpName, LPWSTR lpUserID, LPDWORD lpBufferSize ) 
+{
+    FIXME( "(%s, %p, %p): mostly stub\n", 
+           debugstr_w(lpName), lpUserID, lpBufferSize );
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetConnectionDialog [MPR.61]
+ */ 
+DWORD WINAPI WNetConnectionDialog( HWND hwnd, DWORD dwType )
+{ 
+    FIXME( "(%04x, %08lX): stub\n", hwnd, dwType );
+
+    SetLastError(WN_NO_NETWORK);
+    return ERROR_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetConnectionDialog1A [MPR.59]
+ */
+DWORD WINAPI WNetConnectionDialog1A( LPCONNECTDLGSTRUCTA lpConnDlgStruct )
+{ 
+    FIXME( "(%p): stub\n", lpConnDlgStruct );
+
+    SetLastError(WN_NO_NETWORK);
+    return ERROR_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetConnectionDialog1W [MPR.60]
+ */ 
+DWORD WINAPI WNetConnectionDialog1W( LPCONNECTDLGSTRUCTW lpConnDlgStruct )
+{ 
+    FIXME( "(%p): stub\n", lpConnDlgStruct );
+
+    SetLastError(WN_NO_NETWORK);
+    return ERROR_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetDisconnectDialog [MPR.64]
+ */ 
+DWORD WINAPI WNetDisconnectDialog( HWND hwnd, DWORD dwType )
+{ 
+    FIXME( "(%04x, %08lX): stub\n", hwnd, dwType );
+
+    SetLastError(WN_NO_NETWORK);
+    return ERROR_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetDisconnectDialog1A [MPR.62]
+ */ 
+DWORD WINAPI WNetDisconnectDialog1A( LPDISCDLGSTRUCTA lpConnDlgStruct )
+{ 
+    FIXME( "(%p): stub\n", lpConnDlgStruct );
+
+    SetLastError(WN_NO_NETWORK);
+    return ERROR_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetDisconnectDialog1W [MPR.63]
+ */ 
+DWORD WINAPI WNetDisconnectDialog1W( LPDISCDLGSTRUCTW lpConnDlgStruct )
+{ 
+    FIXME( "(%p): stub\n", lpConnDlgStruct );
+
+    SetLastError(WN_NO_NETWORK);
+    return ERROR_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetGetLastErrorA [MPR.75]
+ */ 
+DWORD WINAPI WNetGetLastErrorA( LPDWORD lpError,
+                                LPSTR lpErrorBuf, DWORD nErrorBufSize,
+                                LPSTR lpNameBuf, DWORD nNameBufSize )
+{
+    FIXME( "(%p, %p, %ld, %p, %ld): stub\n", 
+           lpError, lpErrorBuf, nErrorBufSize, lpNameBuf, nNameBufSize );
+
+    SetLastError(WN_NO_NETWORK);
+    return ERROR_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetGetLastErrorW [MPR.76]
+ */ 
+DWORD WINAPI WNetGetLastErrorW( LPDWORD lpError,
+                                LPWSTR lpErrorBuf, DWORD nErrorBufSize,
+                         LPWSTR lpNameBuf, DWORD nNameBufSize )
+{
+    FIXME( "(%p, %p, %ld, %p, %ld): stub\n", 
+           lpError, lpErrorBuf, nErrorBufSize, lpNameBuf, nNameBufSize );
+
+    SetLastError(WN_NO_NETWORK);
+    return ERROR_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetGetNetworkInformationA [MPR.77]
+ */ 
+DWORD WINAPI WNetGetNetworkInformationA( LPCSTR lpProvider, 
+                                         LPNETINFOSTRUCT lpNetInfoStruct )
+{
+    FIXME( "(%s, %p): stub\n", debugstr_a(lpProvider), lpNetInfoStruct );
+
+    SetLastError(WN_NO_NETWORK);
+    return ERROR_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetGetNetworkInformationW [MPR.77]
+ */ 
+DWORD WINAPI WNetGetNetworkInformationW( LPCWSTR lpProvider, 
+                                         LPNETINFOSTRUCT lpNetInfoStruct )
+{
+    FIXME( "(%s, %p): stub\n", debugstr_w(lpProvider), lpNetInfoStruct );
+
+    SetLastError(WN_NO_NETWORK);
+    return ERROR_NO_NETWORK;
+}
+
+/*****************************************************************
+ *  WNetGetProviderNameA [MPR.79]
+ */
+DWORD WINAPI WNetGetProviderNameA( DWORD dwNetType, 
+                                   LPSTR lpProvider, LPDWORD lpBufferSize )
+{
+    FIXME( "(%ld, %p, %p): stub\n", dwNetType, lpProvider, lpBufferSize );
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
+/*****************************************************************
+ *  WNetGetProviderNameW [MPR.80]
+ */
+DWORD WINAPI WNetGetProviderNameW( DWORD dwNetType,
+                                   LPWSTR lpProvider, LPDWORD lpBufferSize ) 
+{
+    FIXME( "(%ld, %p, %p): stub\n", dwNetType, lpProvider, lpBufferSize );
+
+    SetLastError(WN_NO_NETWORK);
+    return WN_NO_NETWORK;
+}
+
diff --git a/include/netspi.h b/include/netspi.h
new file mode 100644
index 00000000000..884b88e2285
--- /dev/null
+++ b/include/netspi.h
@@ -0,0 +1,134 @@
+/*
+ * MPR - Network provider services
+ */
+
+#ifndef _NETSPI_H_
+#define _NETSPI_H_
+
+#include "windef.h"
+
+/*
+ * Note: The Unicode variants of all these routines/structures
+ *       apparently don't exist, at least not in Win95 ...
+ */
+
+#define HPROVIDER LPVOID
+typedef HPROVIDER *PHPROVIDER;
+
+typedef struct 
+{
+    DWORD  cbStructure;
+    HWND   hwndOwner;
+    LPCSTR lpResource;
+    LPSTR  lpUsername;
+    DWORD  cbUsername;
+    LPSTR  lpPassword;
+    DWORD  cbPassword;
+    LPSTR  lpOrgUnit;
+    DWORD  cbOrgUnit;
+    LPCSTR lpOUTitle;
+    LPCSTR lpExplainText;
+    LPCSTR lpDefaultUserName;
+    DWORD  dwFlags;
+
+} AUTHDLGSTRUCTA, *LPAUTHDLGSTRUCTA;
+
+DECL_WINELIB_TYPE_AW(AUTHDLGSTRUCT)
+DECL_WINELIB_TYPE_AW(LPAUTHDLGSTRUCT)
+
+#define AUTHDLG_ENABLECACHE       0x00000001
+#define AUTHDLG_CHECKCACHE        0x00000002
+#define AUTHDLG_CACHEINVALID      0x00000004
+#define AUTHDLG_USE_DEFAULT_NAME  0x00000008
+#define AUTHDLG_CHECKDEFAULT_NAME 0x00000010
+#define AUTHDLG_LOGON             0x00000020
+
+#define AUTHDLG_ENABLECACHE       0x00000001
+#define AUTHDLG_CHECKCACHE        0x00000002
+#define AUTHDLG_CACHEINVALID      0x00000004
+#define AUTHDLG_USE_DEFAULT_NAME  0x00000008
+#define AUTHDLG_CHECKDEFAULT_NAME 0x00000010
+#define AUTHDLG_LOGON             0x00000020
+
+DWORD WINAPI NPSAuthenticationDialogA(LPAUTHDLGSTRUCTA);
+#define      NPSAuthenticationDialog WINELIB_NAME_AW(NPSAuthenticationDialog)
+DWORD WINAPI NPSGetProviderHandleA(PHPROVIDER);
+#define      NPSGetProviderHandle WINELIB_NAME_AW(NPSGetProviderHandle)
+DWORD WINAPI NPSGetProviderNameA(HPROVIDER,LPCSTR *);
+#define      NPSGetProviderName WINELIB_NAME_AW(NPSGetProviderName)
+DWORD WINAPI NPSGetSectionNameA(HPROVIDER,LPCSTR *lpszSectionName);
+#define      NPSGetSectionName WINELIB_NAME_AW(NPSGetSectionName)
+DWORD WINAPI NPSSetExtendedErrorA(DWORD,LPSTR);
+#define      NPSSetExtendedError WINELIB_NAME_AW(NPSSetExtendedError)
+VOID  WINAPI NPSSetCustomTextA(LPSTR);
+#define      NPSSetCustomText WINELIB_NAME_AW(NPSSetCustomText)
+DWORD WINAPI NPSCopyStringA(LPCSTR,LPVOID,LPDWORD);
+#define      NPSCopyString WINELIB_NAME_AW(NPSCopyString)
+DWORD WINAPI NPSDeviceGetNumberA(LPSTR,LPDWORD,LPDWORD);
+#define      NPSDeviceGetNumber WINELIB_NAME_AW(NPSDeviceGetNumber)
+DWORD WINAPI NPSDeviceGetStringA(DWORD,DWORD,LPSTR,LPDWORD);
+#define      NPSDeviceGetString WINELIB_NAME_AW(NPSDeviceGetString)
+
+
+enum NOTIFYTYPE { NotifyAddConnection,
+                  NotifyCancelConnection,
+                  NotifyGetConnectionPerformance };
+
+#define NOTIFY_PRE              0x00
+#define NOTIFY_POST             0x01
+
+typedef struct 
+{
+    DWORD   cbStructure;
+    DWORD   dwNotifyStatus;
+    DWORD   dwOperationStatus;
+    LPVOID  lpNPContext;
+
+} NOTIFYINFO, *LPNOTIFYINFO;
+
+typedef struct 
+{
+    DWORD        cbStructure;
+    HWND         hwndOwner;
+    NETRESOURCEA NetResource;
+    DWORD        dwAddFlags;
+    LPSTR        lpAccessName;
+    LPDWORD      lpBufferSize;
+    DWORD        dwResult;
+    DWORD        dwAddContext;
+
+} NOTIFYADDA, *LPNOTIFYADDA;
+
+#define CONNECT_CTXT_RESTORE   0x00000001
+#define CONNECT_CTXT_GLOBAL    0x00000002
+#define CONNECT_CTXT_PROVIDER  0x00000004
+#define CONNECT_CTXT_SINGLE    0x00000008
+
+typedef struct 
+{
+    DWORD  cbStructure;
+    LPSTR  lpName;
+    LPSTR  lpProvider;
+    DWORD  dwFlags;
+    BOOL   fForce;
+
+} NOTIFYCANCELA, *LPNOTIFYCANCELA;
+
+typedef struct 
+{
+    DWORD                  cbStructure;
+    LPSTR                  lpRemoteName;
+    LPSTR                  lpProviderName;
+    LPNETCONNECTINFOSTRUCT lpNetConnectInfo;
+
+} NOTIFYPERFORMANCEA, *LPNOTIFYPERFORMANCEA;
+
+typedef DWORD (CALLBACK *NOTIFYCALLBACK)(LPNOTIFYINFO,LPVOID);
+
+DWORD  WINAPI NPSNotifyRegisterA(enum NOTIFYTYPE,NOTIFYCALLBACK);
+#define       NPSNotifyRegister WINELIB_NAME_AW(NPSNotifyRegister)
+LPVOID WINAPI NPSNotifyGetContextA(NOTIFYCALLBACK);
+#define       NPSNotifyGetContext WINELIB_NAME_AW(NPSNotifyGetContext)
+
+#endif _NETSPI_H_
+
diff --git a/include/wine/winnet16.h b/include/wine/winnet16.h
new file mode 100644
index 00000000000..21a84e0e351
--- /dev/null
+++ b/include/wine/winnet16.h
@@ -0,0 +1,267 @@
+/* 
+ * Definitions for windows network service
+ *
+ * Copyright 1997 Andreas Mohr
+ * Copyright 1999 Ulrich Weigand
+ */
+
+#ifndef __WINE_WINNET16_H
+#define __WINE_WINNET16_H
+
+/*
+ * Remote printing
+ */
+
+typedef struct 
+{
+    WORD    pqName;
+    WORD    pqComment;
+    WORD    pqStatus;
+    WORD    pqJobcount;
+    WORD    pqPrinters;
+
+} QUEUESTRUCT16, *LPQUEUESTRUCT16;
+
+#define WNPRQ_ACTIVE    0x0
+#define WNPRQ_PAUSE     0x1
+#define WNPRQ_ERROR     0x2
+#define WNPRQ_PENDING   0x3
+#define WNPRQ_PROBLEM   0x4
+
+typedef struct 
+{
+    WORD    pjId;
+    WORD    pjUsername;
+    WORD    pjParms;
+    WORD    pjPosition;
+    WORD    pjStatus;
+    DWORD   pjSubmitted;
+    DWORD   pjSize;
+    WORD    pjCopies;
+    WORD    pjComment;
+
+} JOBSTRUCT16, *LPJOBSTRUCT16;
+
+#define WNPRJ_QSTATUS           0x0007
+#define WNPRJ_DEVSTATUS         0x0FF8
+
+#define WNPRJ_QS_QUEUED         0x0000
+#define WNPRJ_QS_PAUSED         0x0001
+#define WNPRJ_QS_SPOOLING       0x0002
+#define WNPRJ_QS_PRINTING       0x0003
+
+#define WNPRJ_DS_COMPLETE       0x0008
+#define WNPRJ_DS_INTERV         0x0010
+#define WNPRJ_DS_ERROR          0x0020
+#define WNPRJ_DS_DESTOFFLINE    0x0040
+#define WNPRJ_DS_DESTPAUSED     0x0080
+#define WNPRJ_DS_NOTIFY         0x0100
+#define WNPRJ_DS_DESTNOPAPER    0x0200
+#define WNPRJ_DS_DESTFORMCHG    0x0400
+#define WNPRJ_DS_DESTCRTCHG     0x0800
+#define WNPRJ_DS_DESTPENCHG     0x1000
+
+#define SP_QUEUECHANGED         0x0500
+
+#define WNJ_NULL_JOBID  0
+
+WORD WINAPI WNetOpenJob16(LPSTR,LPSTR,WORD,LPINT16);
+WORD WINAPI WNetCloseJob16(WORD,LPINT16,LPSTR);
+WORD WINAPI WNetWriteJob16(HANDLE16,LPSTR,LPINT16);
+WORD WINAPI WNetAbortJob16(LPSTR,WORD);
+WORD WINAPI WNetHoldJob16(LPSTR,WORD);
+WORD WINAPI WNetReleaseJob16(LPSTR,WORD);
+WORD WINAPI WNetCancelJob16(LPSTR,WORD);
+WORD WINAPI WNetSetJobCopies16(LPSTR,WORD,WORD);
+
+WORD WINAPI WNetWatchQueue16(HWND16,LPSTR,LPSTR,WORD);
+WORD WINAPI WNetUnwatchQueue16(LPSTR);
+WORD WINAPI WNetLockQueueData16(LPSTR,LPSTR,LPQUEUESTRUCT16 *);
+WORD WINAPI WNetUnlockQueueData16(LPSTR);
+
+
+/*
+ * Connections
+ */
+
+WORD WINAPI WNetAddConnection16(LPSTR,LPSTR,LPSTR);
+WORD WINAPI WNetCancelConnection16(LPSTR,BOOL16);
+WORD WINAPI WNetGetConnection16(LPSTR,LPSTR,UINT16 *);
+WORD WINAPI WNetRestoreConnection16(HWND16,LPSTR);
+
+/*
+ * Capabilities
+ */
+
+WORD WINAPI WNetGetCaps16(WORD);
+
+#define WNNC16_SPEC_VERSION                       0x01
+#define WNNC16_NET_TYPE                           0x02
+#define WNNC16_DRIVER_VERSION                     0x03
+#define WNNC16_USER                               0x04
+#define WNNC16_CONNECTION                         0x06
+#define WNNC16_PRINTING                           0x07
+#define WNNC16_DIALOG                             0x08
+#define WNNC16_ADMIN                              0x09
+#define WNNC16_ERROR                              0x0a
+#define WNNC16_PRINTMGREXT                        0x0b
+
+#define WNNC16_NET_NONE                           0x0
+#define WNNC16_NET_MSNet                          0x1
+#define WNNC16_NET_LanMan                         0x2
+#define WNNC16_NET_NetWare                        0x3
+#define WNNC16_NET_Vines                          0x4
+#define WNNC16_NET_10NET                          0x5
+#define WNNC16_NET_Locus                          0x6
+#define WNNC16_NET_SUN_PC_NFS                     0x7
+#define WNNC16_NET_LANstep                        0x8
+#define WNNC16_NET_9TILES                         0x9
+#define WNNC16_NET_LANtastic                      0xa
+#define WNNC16_NET_AS400                          0xb
+#define WNNC16_NET_FTP_NFS                        0xc
+#define WNNC16_NET_PATHWORKS                      0xd
+#define WNNC16_NET_LifeNet                        0xe
+#define WNNC16_NET_POWERLan                       0xf
+#define WNNC16_NET_MultiNet                       0x8000
+
+#define WNNC16_SUBNET_NONE                        0x00
+#define WNNC16_SUBNET_MSNet                       0x01
+#define WNNC16_SUBNET_LanMan                      0x02
+#define WNNC16_SUBNET_WinWorkgroups               0x04
+#define WNNC16_SUBNET_NetWare                     0x08
+#define WNNC16_SUBNET_Vines                       0x10
+#define WNNC16_SUBNET_Other                       0x80
+
+#define WNNC16_CON_AddConnection                  0x0001
+#define WNNC16_CON_CancelConnection               0x0002
+#define WNNC16_CON_GetConnections                 0x0004
+#define WNNC16_CON_AutoConnect                    0x0008
+#define WNNC16_CON_BrowseDialog                   0x0010
+#define WNNC16_CON_RestoreConnection              0x0020
+
+#define WNNC16_PRT_OpenJob                        0x0002
+#define WNNC16_PRT_CloseJob                       0x0004
+#define WNNC16_PRT_HoldJob                        0x0010
+#define WNNC16_PRT_ReleaseJob                     0x0020
+#define WNNC16_PRT_CancelJob                      0x0040
+#define WNNC16_PRT_SetJobCopies                   0x0080
+#define WNNC16_PRT_WatchQueue                     0x0100
+#define WNNC16_PRT_UnwatchQueue                   0x0200
+#define WNNC16_PRT_LockQueueData                  0x0400
+#define WNNC16_PRT_UnlockQueueData                0x0800
+#define WNNC16_PRT_ChangeMsg                      0x1000
+#define WNNC16_PRT_AbortJob                       0x2000
+#define WNNC16_PRT_NoArbitraryLock                0x4000
+#define WNNC16_PRT_WriteJob                       0x8000
+
+#define WNNC16_DLG_DeviceMode                     0x0001
+#define WNNC16_DLG_BrowseDialog                   0x0002
+#define WNNC16_DLG_ConnectDialog                  0x0004
+#define WNNC16_DLG_DisconnectDialog               0x0008
+#define WNNC16_DLG_ViewQueueDialog                0x0010
+#define WNNC16_DLG_PropertyDialog                 0x0020
+#define WNNC16_DLG_ConnectionDialog               0x0040
+#define WNNC16_DLG_PrinterConnectDialog           0x0080
+#define WNNC16_DLG_SharesDialog                   0x0100
+#define WNNC16_DLG_ShareAsDialog                  0x0200
+
+#define WNNC16_ADM_GetDirectoryType               0x0001
+#define WNNC16_ADM_DirectoryNotify                0x0002
+#define WNNC16_ADM_LongNames                      0x0004
+#define WNNC16_ADM_SetDefaultDrive                0x0008
+
+#define WNNC16_ERR_GetError                       0x0001
+#define WNNC16_ERR_GetErrorText                   0x0002
+
+
+/*
+ * Get User
+ */
+
+WORD WINAPI WNetGetUser16(LPSTR,LPINT16);
+
+
+/*
+ * Browsing
+ */
+
+#define WNBD_CONN_UNKNOWN       0x0
+#define WNBD_CONN_DISKTREE      0x1
+#define WNBD_CONN_PRINTQ        0x3
+#define WNBD_MAX_LENGTH         0x80
+
+#define WNTYPE_DRIVE            1
+#define WNTYPE_FILE             2
+#define WNTYPE_PRINTER          3
+#define WNTYPE_COMM             4
+
+#define WNPS_FILE               0
+#define WNPS_DIR                1
+#define WNPS_MULT               2
+
+WORD WINAPI WNetDeviceMode16(HWND16);
+WORD WINAPI WNetBrowseDialog16(HWND16,WORD,LPSTR);
+WORD WINAPI WNetConnectDialog16(HWND16,WORD);
+WORD WINAPI WNetDisconnectDialog16(HWND16,WORD);
+WORD WINAPI WNetConnectionDialog16(HWND16,WORD);
+WORD WINAPI WNetViewQueueDialog16(HWND16,LPSTR);
+WORD WINAPI WNetPropertyDialog16(HWND16,WORD,WORD,LPSTR,WORD);
+WORD WINAPI WNetGetPropertyText16(WORD,WORD,LPSTR,LPSTR,WORD,WORD);
+
+
+/*
+ * Admin
+ */
+
+#define WNDT_NORMAL   0
+#define WNDT_NETWORK  1
+
+#define WNDN_MKDIR    1
+#define WNDN_RMDIR    2
+#define WNDN_MVDIR    3
+
+WORD WINAPI WNetGetDirectoryType16(LPSTR,LPINT16);
+WORD WINAPI WNetDirectoryNotify16(HWND16,LPSTR,WORD);
+
+
+/*
+ * Status codes
+ */
+
+WORD WINAPI WNetGetError16(LPINT16);
+WORD WINAPI WNetGetErrorText16(WORD,LPSTR,LPINT16);
+WORD WINAPI WNetErrorText16(WORD,LPSTR,WORD);
+
+#define WN16_SUCCESS                      0x0000
+#define WN16_NOT_SUPPORTED                0x0001
+#define WN16_NET_ERROR                    0x0002
+#define WN16_MORE_DATA                    0x0003
+#define WN16_BAD_POINTER                  0x0004
+#define WN16_BAD_VALUE                    0x0005
+#define WN16_BAD_PASSWORD                 0x0006
+#define WN16_ACCESS_DENIED                0x0007
+#define WN16_FUNCTION_BUSY                0x0008
+#define WN16_WINDOWS_ERROR                0x0009
+#define WN16_BAD_USER                     0x000A
+#define WN16_OUT_OF_MEMORY                0x000B
+#define WN16_CANCEL                       0x000C
+#define WN16_CONTINUE                     0x000D
+#define WN16_NOT_CONNECTED                0x0030
+#define WN16_OPEN_FILES                   0x0031
+#define WN16_BAD_NETNAME                  0x0032
+#define WN16_BAD_LOCALNAME                0x0033
+#define WN16_ALREADY_CONNECTED            0x0034
+#define WN16_DEVICE_ERROR                 0x0035
+#define WN16_CONNECTION_CLOSED            0x0036
+#define WN16_BAD_JOBID                    0x0040
+#define WN16_JOB_NOT_FOUND                0x0041
+#define WN16_JOB_NOT_HELD                 0x0042
+#define WN16_BAD_QUEUE                    0x0043
+#define WN16_BAD_FILE_HANDLE              0x0044
+#define WN16_CANT_SET_COPIES              0x0045
+#define WN16_ALREADY_LOCKED               0x0046
+#define WN16_NO_ERROR                     0x0050
+
+
+
+#endif /* __WINE_WINNET16_H */
diff --git a/include/winerror.h b/include/winerror.h
index 1039a233c22..bfc1697d42c 100644
--- a/include/winerror.h
+++ b/include/winerror.h
@@ -250,8 +250,54 @@ extern int WIN32_LastError;
 #define ERROR_IO_DEVICE             1117
 #define ERROR_POSSIBLE_DEADLOCK     1131
 #define ERROR_BAD_DEVICE            1200
+#define ERROR_CONNECTION_UNAVAIL    1201
+#define ERROR_DEVICE_ALREADY_REMEMBERED 1202
+#define ERROR_NO_NET_OR_BAD_PATH    1203
+#define ERROR_BAD_PROVIDER          1204
+#define ERROR_CANNOT_OPEN_PROFILE   1205
+#define ERROR_BAD_PROFILE           1206
+#define ERROR_NOT_CONTAINER         1207
+#define ERROR_EXTENDED_ERROR        1208
+#define ERROR_INVALID_GROUPNAME     1209
+#define ERROR_INVALID_COMPUTERNAME  1210
+#define ERROR_INVALID_EVENTNAME     1211
+#define ERROR_INVALID_DOMAINNAME    1212
+#define ERROR_INVALID_SERVICENAME   1213
+#define ERROR_INVALID_NETNAME       1214
+#define ERROR_INVALID_SHARENAME     1215
+#define ERROR_INVALID_PASSWORDNAME  1216
+#define ERROR_INVALID_MESSAGENAME   1217
+#define ERROR_INVALID_MESSAGEDEST   1218
+#define ERROR_SESSION_CREDENTIAL_CONFLICT 1219
+#define ERROR_REMOTE_SESSION_LIMIT_EXCEEDED 1220
+#define ERROR_DUP_DOMAINNAME        1221
 #define ERROR_NO_NETWORK            1222
+#define ERROR_CANCELLED             1223
+#define ERROR_USER_MAPPED_FILE      1224
+#define ERROR_CONNECTION_REFUSED    1225
+#define ERROR_GRACEFUL_DISCONNECT   1226
+#define ERROR_ADDRESS_ALREADY_ASSOCIATED 1227
+#define ERROR_ADDRESS_NOT_ASSOCIATED 1228
+#define ERROR_CONNECTION_INVALID    1229
+#define ERROR_CONNECTION_ACTIVE     1230
+#define ERROR_NETWORK_UNREACHABLE   1231
+#define ERROR_HOST_UNREACHABLE      1232
+#define ERROR_PROTOCOL_UNREACHABLE  1233
+#define ERROR_PORT_UNREACHABLE      1234
+#define ERROR_REQUEST_ABORTED       1235
+#define ERROR_CONNECTION_ABORTED    1236
+#define ERROR_RETRY                 1237
+#define ERROR_CONNECTION_COUNT_LIMIT 1238
+#define ERROR_LOGIN_TIME_RESTRICTION 1239
+#define ERROR_LOGIN_WKSTA_RESTRICTION 1240
+#define ERROR_INCORRECT_ADDRESS     1241
+#define ERROR_ALREADY_REGISTERED    1242
+#define ERROR_SERVICE_NOT_FOUND     1243
+#define ERROR_NOT_AUTHENTICATED     1244
+#define ERROR_NOT_LOGGED_ON         1245
+#define ERROR_CONTINUE              1246
 #define ERROR_ALREADY_INITIALIZED   1247
+#define ERROR_NO_MORE_DEVICES       1248
 #define ERROR_PRIVILEGE_NOT_HELD    1314
 #define ERROR_INVALID_WINDOW_HANDLE 1400
 #define ERROR_CANNOT_FIND_WND_CLASS 1407
@@ -271,6 +317,11 @@ extern int WIN32_LastError;
 #define ERROR_INVALID_PRINTER_COMMAND 1803
 #define ERROR_INVALID_DATATYPE       1804
 #define ERROR_INVALID_ENVIRONMENT    1805
+#define ERROR_BAD_USERNAME           2202
+#define ERROR_NOT_CONNECTED          2250
+#define ERROR_OPEN_FILES             2401
+#define ERROR_ACTIVE_CONNECTIONS     2402
+#define ERROR_DEVICE_IN_USE          2404
 
 /* HRESULT values for OLE, SHELL and other Interface stuff */
 /* the codes 4000-40ff are reserved for OLE */
diff --git a/include/winnetwk.h b/include/winnetwk.h
index be4ba8d1c20..ea4c0298ab6 100644
--- a/include/winnetwk.h
+++ b/include/winnetwk.h
@@ -1,8 +1,69 @@
+
 #ifndef _WINNETWK_H_
 #define _WINNETWK_H_
 
 #include "windef.h"
+#include "winerror.h"
+
+/*
+ * Network types
+ */
+
+#define WNNC_NET_MSNET      0x00010000
+#define WNNC_NET_LANMAN     0x00020000
+#define WNNC_NET_NETWARE    0x00030000
+#define WNNC_NET_VINES      0x00040000
+#define WNNC_NET_10NET      0x00050000
+#define WNNC_NET_LOCUS      0x00060000
+#define WNNC_NET_SUN_PC_NFS 0x00070000
+#define WNNC_NET_LANSTEP    0x00080000
+#define WNNC_NET_9TILES     0x00090000
+#define WNNC_NET_LANTASTIC  0x000A0000
+#define WNNC_NET_AS400      0x000B0000
+#define WNNC_NET_FTP_NFS    0x000C0000
+#define WNNC_NET_PATHWORKS  0x000D0000
+#define WNNC_NET_LIFENET    0x000E0000
+#define WNNC_NET_POWERLAN   0x000F0000
+#define WNNC_NET_BWNFS      0x00100000
+#define WNNC_NET_COGENT     0x00110000
+#define WNNC_NET_FARALLON   0x00120000
+#define WNNC_NET_APPLETALK  0x00130000
+#define WNNC_NET_INTERGRAPH 0x00140000
+
+/*
+ *  Network resources
+ */
+
+#define RESOURCE_CONNECTED      0x00000001
+#define RESOURCE_GLOBALNET      0x00000002
+#define RESOURCE_REMEMBERED     0x00000003
+#define RESOURCE_RECENT         0x00000004
+#define RESOURCE_CONTEXT        0x00000005
+
+#define RESOURCETYPE_ANY        0x00000000
+#define RESOURCETYPE_DISK       0x00000001
+#define RESOURCETYPE_PRINT      0x00000002
+#define RESOURCETYPE_RESERVED   0x00000008
+#define RESOURCETYPE_UNKNOWN    0xFFFFFFFF
+
+#define RESOURCEUSAGE_CONNECTABLE   0x00000001
+#define RESOURCEUSAGE_CONTAINER     0x00000002
+#define RESOURCEUSAGE_NOLOCALDEVICE 0x00000004
+#define RESOURCEUSAGE_SIBLING       0x00000008
+#define RESOURCEUSAGE_ALL           (RESOURCEUSAGE_CONNECTABLE | RESOURCEUSAGE_CONTAINER)
+#define RESOURCEUSAGE_RESERVED      0x80000000
 
+#define RESOURCEDISPLAYTYPE_GENERIC        0x00000000
+#define RESOURCEDISPLAYTYPE_DOMAIN         0x00000001
+#define RESOURCEDISPLAYTYPE_SERVER         0x00000002
+#define RESOURCEDISPLAYTYPE_SHARE          0x00000003
+#define RESOURCEDISPLAYTYPE_FILE           0x00000004
+#define RESOURCEDISPLAYTYPE_GROUP          0x00000005
+#define RESOURCEDISPLAYTYPE_NETWORK        0x00000006
+#define RESOURCEDISPLAYTYPE_ROOT           0x00000007
+#define RESOURCEDISPLAYTYPE_SHAREADMIN     0x00000008
+#define RESOURCEDISPLAYTYPE_DIRECTORY      0x00000009
+#define RESOURCEDISPLAYTYPE_TREE           0x0000000A
 
 typedef struct {
 	DWORD	dwScope;
@@ -29,6 +90,53 @@ typedef struct {
 DECL_WINELIB_TYPE_AW(NETRESOURCE)
 DECL_WINELIB_TYPE_AW(LPNETRESOURCE)
 
+
+/*
+ *  Network connections
+ */
+
+#define NETPROPERTY_PERSISTENT       1
+
+#define CONNECT_UPDATE_PROFILE      0x00000001
+#define CONNECT_UPDATE_RECENT       0x00000002
+#define CONNECT_TEMPORARY           0x00000004
+#define CONNECT_INTERACTIVE         0x00000008
+#define CONNECT_PROMPT              0x00000010
+#define CONNECT_NEED_DRIVE          0x00000020
+#define CONNECT_REFCOUNT            0x00000040
+#define CONNECT_REDIRECT            0x00000080
+#define CONNECT_LOCALDRIVE          0x00000100
+#define CONNECT_CURRENT_MEDIA       0x00000200
+
+DWORD WINAPI WNetAddConnectionA(LPCSTR,LPCSTR,LPCSTR);
+DWORD WINAPI WNetAddConnectionW(LPCWSTR,LPCWSTR,LPCWSTR);
+#define      WNetAddConnection WINELIB_NAME_AW(WNetAddConnection)
+DWORD WINAPI WNetAddConnection2A(LPNETRESOURCEA,LPCSTR,LPCSTR,DWORD);
+DWORD WINAPI WNetAddConnection2W(LPNETRESOURCEW,LPCWSTR,LPCWSTR,DWORD);
+#define      WNetAddConnection2 WINELIB_NAME_AW(WNetAddConnection2)
+DWORD WINAPI WNetAddConnection3A(HWND,LPNETRESOURCEA,LPCSTR,LPCSTR,DWORD);
+DWORD WINAPI WNetAddConnection3W(HWND,LPNETRESOURCEW,LPCWSTR,LPCWSTR,DWORD);
+#define      WNetAddConnection3 WINELIB_NAME_AW(WNetAddConnection3)
+DWORD WINAPI WNetCancelConnectionA(LPCSTR,BOOL);
+DWORD WINAPI WNetCancelConnectionW(LPCWSTR,BOOL);
+#define      WNetCancelConnection WINELIB_NAME_AW(WNetCancelConnection)
+DWORD WINAPI WNetCancelConnection2A(LPCSTR,DWORD,BOOL);
+DWORD WINAPI WNetCancelConnection2W(LPCWSTR,DWORD,BOOL);
+#define      WNetCancelConnection2 WINELIB_NAME_AW(WNetCancelConnection2)
+DWORD WINAPI WNetGetConnectionA(LPCSTR,LPSTR,LPDWORD);
+DWORD WINAPI WNetGetConnectionW(LPCWSTR,LPWSTR,LPDWORD);
+#define      WNetGetConnection WINELIB_NAME_AW(WNetGetConnection)
+DWORD WINAPI WNetUseConnectionA(HWND,LPNETRESOURCEA,LPCSTR,LPCSTR,DWORD,LPSTR,LPDWORD,LPDWORD);
+DWORD WINAPI WNetUseConnectionW(HWND,LPNETRESOURCEW,LPCWSTR,LPCWSTR,DWORD,LPWSTR,LPDWORD,LPDWORD);
+#define      WNetUseConnection WINELIB_NAME_AW(WNetUseConnection)
+DWORD WINAPI WNetSetConnectionA(LPCSTR,DWORD,LPVOID);
+DWORD WINAPI WNetSetConnectionW(LPCWSTR,DWORD,LPVOID);
+#define      WNetSetConnection WINELIB_NAME_AW(WNetSetConnection)
+
+/*
+ *  Network connection dialogs
+ */
+
 typedef struct {
     DWORD cbStructure;       /* size of this structure in bytes */
     HWND hwndOwner;          /* owner window for the dialog */
@@ -47,8 +155,6 @@ typedef struct {
 DECL_WINELIB_TYPE_AW(CONNECTDLGSTRUCT)
 DECL_WINELIB_TYPE_AW(LPCONNECTDLGSTRUCT)
 
-
-/**/
 #define CONNDLG_RO_PATH     0x00000001 /* Resource path should be read-only    */
 #define CONNDLG_CONN_POINT  0x00000002 /* Netware -style movable connection point enabled */
 #define CONNDLG_USE_MRU     0x00000004 /* Use MRU combobox  */
@@ -56,6 +162,176 @@ DECL_WINELIB_TYPE_AW(LPCONNECTDLGSTRUCT)
 #define CONNDLG_PERSIST     0x00000010 /* Force persistent connection */
 #define CONNDLG_NOT_PERSIST 0x00000020 /* Force connection NOT persistent */
 
+typedef struct {
+    DWORD           cbStructure;      /* size of this structure in bytes */
+    HWND            hwndOwner;        /* owner window for the dialog */
+    LPSTR           lpLocalName;      /* local device name */
+    LPSTR           lpRemoteName;     /* network resource name */
+    DWORD           dwFlags;          /* flags */
+} DISCDLGSTRUCTA, *LPDISCDLGSTRUCTA;
+typedef struct {
+    DWORD           cbStructure;      /* size of this structure in bytes */
+    HWND            hwndOwner;        /* owner window for the dialog */
+    LPWSTR          lpLocalName;      /* local device name */
+    LPWSTR          lpRemoteName;     /* network resource name */
+    DWORD           dwFlags;          /* flags */
+} DISCDLGSTRUCTW, *LPDISCDLGSTRUCTW;
+
+DECL_WINELIB_TYPE_AW(DISCDLGSTRUCT)
+DECL_WINELIB_TYPE_AW(LPDISCDLGSTRUCT)
+
+#define DISC_UPDATE_PROFILE         0x00000001
+#define DISC_NO_FORCE               0x00000040
+
+DWORD WINAPI WNetConnectionDialog(HWND,DWORD);
+DWORD WINAPI WNetDisconnectDialog(HWND,DWORD);
+DWORD WINAPI WNetConnectionDialog1A(LPCONNECTDLGSTRUCTA);
+DWORD WINAPI WNetConnectionDialog1W(LPCONNECTDLGSTRUCTW);
+#define      WNetConnectionDialog1 WINELIB_NAME_AW(WNetConnectionDialog1)
+DWORD WINAPI WNetDisconnectDialog1A(LPDISCDLGSTRUCTA);
+DWORD WINAPI WNetDisconnectDialog1W(LPDISCDLGSTRUCTW);
+#define      WNetDisconnectDialog1 WINELIB_NAME_AW(WNetDisconnectDialog1)
+
+/*
+ *  Network browsing
+ */
+
+DWORD WINAPI WNetOpenEnumA(DWORD,DWORD,DWORD,LPNETRESOURCEA,LPHANDLE);
+DWORD WINAPI WNetOpenEnumW(DWORD,DWORD,DWORD,LPNETRESOURCEW,LPHANDLE);
+#define      WNetOpenEnum WINELIB_NAME_AW(WNetOpenEnum)
+DWORD WINAPI WNetEnumResourceA(HANDLE,LPDWORD,LPVOID,LPDWORD);
+DWORD WINAPI WNetEnumResourceW(HANDLE,LPDWORD,LPVOID,LPDWORD);
+#define      WNetEnumResource WINELIB_NAME_AW(WNetEnumResource)
+DWORD WINAPI WNetCloseEnum(HANDLE);
+
+/*
+ *  Universal naming
+ */
+
+#define UNIVERSAL_NAME_INFO_LEVEL   0x00000001
+#define REMOTE_NAME_INFO_LEVEL      0x00000002
+
+typedef struct {
+    LPSTR    lpUniversalName;
+} UNIVERSAL_NAME_INFOA, *LPUNIVERSAL_NAME_INFOA;
+typedef struct {
+    LPWSTR   lpUniversalName;
+} UNIVERSAL_NAME_INFOW, *LPUNIVERSAL_NAME_INFOW;
+
+DECL_WINELIB_TYPE_AW(UNIVERSAL_NAME_INFO)
+DECL_WINELIB_TYPE_AW(LPUNIVERSAL_NAME_INFO)
+
+typedef struct {
+    LPSTR    lpUniversalName;
+    LPSTR    lpConnectionName;
+    LPSTR    lpRemainingPath;
+}REMOTE_NAME_INFOA, *LPREMOTE_NAME_INFOA;
+typedef struct {
+    LPWSTR   lpUniversalName;
+    LPWSTR   lpConnectionName;
+    LPWSTR   lpRemainingPath;
+}REMOTE_NAME_INFOW, *LPREMOTE_NAME_INFOW;
+
+DECL_WINELIB_TYPE_AW(REMOTE_NAME_INFO)
+DECL_WINELIB_TYPE_AW(LPREMOTE_NAME_INFO)
+
+DWORD WINAPI WNetGetUniversalNameA(LPCSTR,DWORD,LPVOID,LPDWORD);
+DWORD WINAPI WNetGetUniversalNameW(LPCWSTR,DWORD,LPVOID,LPDWORD);
+#define      WNetGetUniversalName WINELIB_NAME_AW(WNetGetUniversalName)
+
+/*
+ *  Other
+ */
+
+DWORD WINAPI WNetGetUserA(LPCSTR,LPSTR,LPDWORD);
+DWORD WINAPI WNetGetUserW(LPCWSTR,LPWSTR,LPDWORD);
+#define      WNetGetUser WINELIB_NAME_AW(WNetGetUser)
+
+#define WNFMT_MULTILINE         0x01
+#define WNFMT_ABBREVIATED       0x02
+#define WNFMT_INENUM            0x10
+#define WNFMT_CONNECTION        0x20
+
+DWORD WINAPI WNetGetProviderNameA(DWORD,LPSTR,LPDWORD);
+DWORD WINAPI WNetGetProviderNameW(DWORD,LPWSTR,LPDWORD);
+#define      WNetGetProviderName WINELIB_NAME_AW(WNetGetProviderName)
+
+typedef struct {
+    DWORD cbStructure;
+    DWORD dwProviderVersion;
+    DWORD dwStatus;
+    DWORD dwCharacteristics;
+    DWORD dwHandle;
+    WORD  wNetType;
+    DWORD dwPrinters;
+    DWORD dwDrives;
+} NETINFOSTRUCT, *LPNETINFOSTRUCT;
+
+#define NETINFO_DLL16       0x00000001
+#define NETINFO_DISKRED     0x00000004
+#define NETINFO_PRINTERRED  0x00000008
+
+DWORD WINAPI WNetGetNetworkInformationA(LPCSTR,LPNETINFOSTRUCT);
+DWORD WINAPI WNetGetNetworkInformationW(LPCWSTR,LPNETINFOSTRUCT);
+#define      WNetGetNetworkInformation WINELIB_NAME_AW(WNetGetNetworkInformation)
+
+
+/*
+ *  Status codes
+ */
+
+DWORD WINAPI WNetGetLastErrorA(LPDWORD,LPSTR,DWORD,LPSTR,DWORD);
+DWORD WINAPI WNetGetLastErrorW(LPDWORD,LPWSTR,DWORD,LPWSTR,DWORD);
+#define      WNetGetLastError WINELIB_NAME_AW(WNetGetLastError)
+
+#define WN_SUCCESS                      NO_ERROR
+#define WN_NO_ERROR                     NO_ERROR
+#define WN_NOT_SUPPORTED                ERROR_NOT_SUPPORTED
+#define WN_CANCEL                       ERROR_CANCELLED
+#define WN_RETRY                        ERROR_RETRY
+#define WN_NET_ERROR                    ERROR_UNEXP_NET_ERR
+#define WN_MORE_DATA                    ERROR_MORE_DATA
+#define WN_BAD_POINTER                  ERROR_INVALID_ADDRESS
+#define WN_BAD_VALUE                    ERROR_INVALID_PARAMETER
+#define WN_BAD_USER                     ERROR_BAD_USERNAME
+#define WN_BAD_PASSWORD                 ERROR_INVALID_PASSWORD
+#define WN_ACCESS_DENIED                ERROR_ACCESS_DENIED
+#define WN_FUNCTION_BUSY                ERROR_BUSY
+#define WN_WINDOWS_ERROR                ERROR_UNEXP_NET_ERR
+#define WN_OUT_OF_MEMORY                ERROR_NOT_ENOUGH_MEMORY
+#define WN_NO_NETWORK                   ERROR_NO_NETWORK
+#define WN_EXTENDED_ERROR               ERROR_EXTENDED_ERROR
+#define WN_BAD_LEVEL                    ERROR_INVALID_LEVEL
+#define WN_BAD_HANDLE                   ERROR_INVALID_HANDLE
+#define WN_NOT_INITIALIZING             ERROR_ALREADY_INITIALIZED
+#define WN_NO_MORE_DEVICES              ERROR_NO_MORE_DEVICES
+
+#define WN_NOT_CONNECTED                ERROR_NOT_CONNECTED
+#define WN_OPEN_FILES                   ERROR_OPEN_FILES
+#define WN_DEVICE_IN_USE                ERROR_DEVICE_IN_USE
+#define WN_BAD_NETNAME                  ERROR_BAD_NET_NAME
+#define WN_BAD_LOCALNAME                ERROR_BAD_DEVICE
+#define WN_ALREADY_CONNECTED            ERROR_ALREADY_ASSIGNED
+#define WN_DEVICE_ERROR                 ERROR_GEN_FAILURE
+#define WN_CONNECTION_CLOSED            ERROR_CONNECTION_UNAVAIL
+#define WN_NO_NET_OR_BAD_PATH           ERROR_NO_NET_OR_BAD_PATH
+#define WN_BAD_PROVIDER                 ERROR_BAD_PROVIDER
+#define WN_CANNOT_OPEN_PROFILE          ERROR_CANNOT_OPEN_PROFILE
+#define WN_BAD_PROFILE                  ERROR_BAD_PROFILE
+#define WN_BAD_DEV_TYPE                 ERROR_BAD_DEV_TYPE
+#define WN_DEVICE_ALREADY_REMEMBERED    ERROR_DEVICE_ALREADY_REMEMBERED
+
+#define WN_NO_MORE_ENTRIES              ERROR_NO_MORE_ITEMS
+#define WN_NOT_CONTAINER                ERROR_NOT_CONTAINER
+
+#define WN_NOT_AUTHENTICATED            ERROR_NOT_AUTHENTICATED
+#define WN_NOT_LOGGED_ON                ERROR_NOT_LOGGED_ON
+#define WN_NOT_VALIDATED                ERROR_NO_LOGON_SERVERS
+
+
+/*
+ *  Multinet (for Shell)
+ */
 
 typedef struct {
 	DWORD	cbStructure;
@@ -64,34 +340,18 @@ typedef struct {
 	DWORD	dwDelay;
 	DWORD	dwOptDataSize;
 } NETCONNECTINFOSTRUCT,*LPNETCONNECTINFOSTRUCT;
-  
-
-UINT        WINAPI WNetAddConnection2A(LPNETRESOURCEA,LPCSTR,LPCSTR,DWORD);
-UINT        WINAPI WNetAddConnection2W(LPNETRESOURCEW,LPCWSTR,LPCWSTR,DWORD);
-#define     WNetAddConnection2 WINELIB_NAME_AW(WNetAddConnection2)
-UINT        WINAPI WNetAddConnection3A(HWND,LPNETRESOURCEA,LPCSTR,LPCSTR,DWORD);
-UINT        WINAPI WNetAddConnection3W(HWND,LPNETRESOURCEW,LPCWSTR,LPCWSTR,DWORD);
-#define     WNetAddConnection3 WINELIB_NAME_AW(WNetAddConnection3)
-UINT        WINAPI WNetConnectionDialog1(HWND,DWORD);
-UINT        WINAPI WNetConnectionDialog1A(LPCONNECTDLGSTRUCTA);
-UINT        WINAPI WNetConnectionDialog1W(LPCONNECTDLGSTRUCTW);
-#define     WNetConnectionDialog1 WINELIB_NAME_AW(WNetConnectionDialog1)
-UINT        WINAPI MultinetGetErrorTextA(DWORD,DWORD,DWORD);
-UINT        WINAPI MultinetGetErrorTextW(DWORD,DWORD,DWORD);
-#define     MultinetGetErrorText WINELIB_NAME_AW(MultinetGetErrorText)
-DWORD       WINAPI NPSGetSectionNameA(DWORD,LPCSTR*);
-DWORD       WINAPI NPSGetSectionNameW(DWORD,LPCWSTR*);
-#define     NPSGetSectionName WINELIB_NAME_AW(NPSGetSectionName)
-
-#define RESOURCETYPE_ANY             0x00000000
-#define RESOURCETYPE_DISK            0x00000001
-#define RESOURCETYPE_PRINT           0x00000002
-
-#define CONNECT_UPDATE_PROFILE       0x00000001
-#define CONNECT_UPDATE_RECENT        0x00000002
-#define CONNECT_TEMPORARY            0x00000004
-#define CONNECT_INTERACTIVE          0x00000008
-#define CONNECT_PROMPT               0x00000010
-#define CONNECT_NEED_DRIVE           0x00000020
+
+#define WNCON_FORNETCARD        0x00000001
+#define WNCON_NOTROUTED         0x00000002
+#define WNCON_SLOWLINK          0x00000004
+#define WNCON_DYNAMIC           0x00000008
+
+DWORD WINAPI MultinetGetConnectionPerformanceA(LPNETRESOURCEA,LPNETCONNECTINFOSTRUCT);
+DWORD WINAPI MultinetGetConnectionPerformanceW(LPNETRESOURCEW,LPNETCONNECTINFOSTRUCT);
+#define      MultinetGetConnectionPerformance WINELIB_NAME_AW(MultinetGetConnectionPerformance)
+DWORD WINAPI MultinetGetErrorTextA(DWORD,DWORD,DWORD);
+DWORD WINAPI MultinetGetErrorTextW(DWORD,DWORD,DWORD);
+#define      MultinetGetErrorText WINELIB_NAME_AW(MultinetGetErrorText)
+
 
 #endif /* _WINNETWK_H_ */
diff --git a/include/winuser.h b/include/winuser.h
index 9816def93c5..9bc8d99d60e 100644
--- a/include/winuser.h
+++ b/include/winuser.h
@@ -3569,9 +3569,6 @@ HWND      WINAPI WindowFromPoint(POINT);
 BOOL      WINAPI WinHelpA(HWND,LPCSTR,UINT,DWORD);
 BOOL      WINAPI WinHelpW(HWND,LPCWSTR,UINT,DWORD);
 #define     WinHelp WINELIB_NAME_AW(WinHelp)
-UINT      WINAPI WNetAddConnectionA(LPCSTR,LPCSTR,LPCSTR);
-UINT      WINAPI WNetAddConnectionW(LPCWSTR,LPCWSTR,LPCWSTR);
-#define     WNetAddConnection WINELIB_NAME_AW(WNetAddConnection)
 INT       WINAPIV wsnprintfA(LPSTR,UINT,LPCSTR,...);
 INT       WINAPIV wsnprintfW(LPWSTR,UINT,LPCWSTR,...);
 #define     wsnprintf WINELIB_NAME_AW(wsnprintf)
diff --git a/include/wnet.h b/include/wnet.h
deleted file mode 100644
index b7d7fedf2f1..00000000000
--- a/include/wnet.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/* Definitions for windows network service
- * 
- * Copyright 1997 Andreas Mohr
- */
-#ifndef __WINE_WNET_H
-#define __WINE_WNET_H
-
-#include "windef.h"
-#include "winerror.h"
-
-#define WNDN_MKDIR  1
-#define WNDN_RMDIR  2
-#define WNDN_MVDIR  3
-
-#define WN_SUCCESS                              0x0000
-#define WN_NOT_SUPPORTED                        0x0001
-#define WN_NET_ERROR                            0x0002
-#define WN_MORE_DATA                            0x0003
-#define WN_BAD_POINTER                          0x0004
-#define WN_BAD_VALUE                            0x0005
-#define WN_BAD_PASSWORD                         0x0006
-#define WN_ACCESS_DENIED                        0x0007
-#define WN_FUNCTION_BUSY                        0x0008
-#define WN_WINDOWS_ERROR                        0x0009
-#define WN_BAD_USER                             0x000A
-#define WN_OUT_OF_MEMORY                        0x000B
-#define WN_CANCEL                               0x000C
-#define WN_CONTINUE                             0x000D
-#define WN_BAD_HANDLE                           ERROR_INVALID_HANDLE
-#define WN_NOT_CONNECTED                        0x0030
-#define WN_OPEN_FILES                           0x0031
-#define WN_BAD_NETNAME                          0x0032
-#define WN_BAD_LOCALNAME                        0x0033
-#define WN_ALREADY_CONNECTED                    0x0034
-#define WN_DEVICE_ERROR                         0x0035
-#define WN_CONNECTION_CLOSED                    0x0036
-#define WN_NO_NETWORK                           ERROR_NO_NETWORK
-
-#define WNNC_SPEC_VERSION                       0x01
-#define WNNC_NET_TYPE                           0x02
-#define WNNC_DRIVER_VERSION                     0x03
-#define WNNC_USER                               0x04
-/*#define WNNC_5                                0x05*/
-#define WNNC_CONNECTION                         0x06
-#define WNNC_PRINTING                           0x07
-#define WNNC_DIALOG                             0x08
-#define WNNC_ADMIN                              0x09
-#define WNNC_ERROR                              0x0a
-#define WNNC_PRINTMGREXT                        0x0b
-
-#define WNNC_NET_NONE                           0x0
-#define WNNC_NET_MSNet                          0x1
-#define WNNC_NET_LanMan                         0x2
-#define WNNC_NET_NetWare                        0x3
-#define WNNC_NET_Vines                          0x4
-#define WNNC_NET_10NET                          0x5
-#define WNNC_NET_Locus                          0x6
-#define WNNC_NET_SUN_PC_NFS                     0x7
-#define WNNC_NET_LANstep                        0x8
-#define WNNC_NET_9TILES                         0x9
-#define WNNC_NET_LANtastic                      0xa
-#define WNNC_NET_AS400                          0xb
-#define WNNC_NET_FTP_NFS                        0xc
-#define WNNC_NET_PATHWORKS                      0xd
-#define WNNC_NET_LifeNet                        0xe
-#define WNNC_NET_POWERLan                       0xf
-#define WNNC_NET_MultiNet                       0x8000
-
-#define WNNC_SUBNET_NONE                        0x00
-#define WNNC_SUBNET_MSNet                       0x01
-#define WNNC_SUBNET_LanMan                      0x02
-#define WNNC_SUBNET_WinWorkgroups               0x04
-#define WNNC_SUBNET_NetWare                     0x08
-#define WNNC_SUBNET_Vines                       0x10
-#define WNNC_SUBNET_Other                       0x80
-
-#define WNNC_CON_AddConnection                  0x0001
-#define WNNC_CON_CancelConnection               0x0002
-#define WNNC_CON_GetConnections                 0x0004
-#define WNNC_CON_AutoConnect                    0x0008
-#define WNNC_CON_BrowseDialog                   0x0010
-#define WNNC_CON_RestoreConnection              0x0020
-
-#define WNNC_PRT_OpenJob                        0x0002
-#define WNNC_PRT_CloseJob                       0x0004
-#define WNNC_PRT_HoldJob                        0x0010
-#define WNNC_PRT_ReleaseJob                     0x0020
-#define WNNC_PRT_CancelJob                      0x0040
-#define WNNC_PRT_SetJobCopies                   0x0080
-#define WNNC_PRT_WatchQueue                     0x0100
-#define WNNC_PRT_UnwatchQueue                   0x0200
-#define WNNC_PRT_LockQueueData                  0x0400
-#define WNNC_PRT_UnlockQueueData                0x0800
-#define WNNC_PRT_ChangeMsg                      0x1000
-#define WNNC_PRT_AbortJob                       0x2000
-#define WNNC_PRT_NoArbitraryLock                0x4000
-#define WNNC_PRT_WriteJob                       0x8000
-
-#define WNNC_DLG_DeviceMode                     0x0001
-#define WNNC_DLG_BrowseDialog                   0x0002
-#define WNNC_DLG_ConnectDialog                  0x0004
-#define WNNC_DLG_DisconnectDialog               0x0008
-#define WNNC_DLG_ViewQueueDialog                0x0010
-#define WNNC_DLG_PropertyDialog                 0x0020
-#define WNNC_DLG_ConnectionDialog               0x0040
-#define WNNC_DLG_PrinterConnectDialog           0x0080
-#define WNNC_DLG_SharesDialog                   0x0100
-#define WNNC_DLG_ShareAsDialog                  0x0200
-
-#define WNNC_ADM_GetDirectoryType               0x0001
-#define WNNC_ADM_DirectoryNotify                0x0002
-#define WNNC_ADM_LongNames                      0x0004
-#define WNNC_ADM_SetDefaultDrive                0x0008
-
-#define WNNC_ERR_GetError                       0x0001
-#define WNNC_ERR_GetErrorText                   0x0002
-
-#define WNDT_NORMAL                             0x0
-#define WNDT_NETWORK                            0x1
-
-#define WIN30X                                  0x0
-#define WIN31X                                  0x1
-#define WIN311X                                 0x2
-#define WIN95X                                  0x3
-#define WINNTX                                  0x4
-#define WINOTHERX                               0x5
-#define WIN32X                                  0x6
-
-typedef LPVOID  LPNETRESOURCE16;
-
-#endif	/* __WINE_WNET_H */
diff --git a/misc/network.c b/misc/network.c
index e332ebe233b..9f870bb6bfd 100644
--- a/misc/network.c
+++ b/misc/network.c
@@ -1,9 +1,5 @@
 /*
- * Network functions
- *
- * This is the MPR.DLL stuff from Win32,  as well as the USER
- * stuff by the same names in Win 3.x.  
- *
+ * USER Windows Network functions
  */
 
 #include <ctype.h>
@@ -12,982 +8,419 @@
 #include <pwd.h>
 #include <unistd.h>
 
-#include "windef.h"
+#include "winbase.h"
+#include "wine/winnet16.h"
 #include "winnetwk.h"
-#include "winuser.h"
-#include "winerror.h"
 #include "drive.h"
-#include "wnet.h"
 #include "debugtools.h"
 #include "heap.h"
 
-DECLARE_DEBUG_CHANNEL(mpr)
-DECLARE_DEBUG_CHANNEL(wnet)
-
-/********************************************************************
- *  WNetAddConnection16 [USER.517]  Directs a local device to net
- * 
- * Redirects a local device (either a disk drive or printer port)
- * to a shared device on a remote server.
- */
-UINT16 WINAPI WNetAddConnection16(LPCSTR lpNetPath, LPCSTR lpPassWord,
-                                LPCSTR lpLocalName)
-{	
-   return WNetAddConnectionA(lpNetPath, lpPassWord, lpLocalName);
-}
-
-/*********************************************************************
- *  WNetAddConnection32 [MPR.50] 
- */
-
-UINT WINAPI WNetAddConnectionA(LPCSTR NetPath, LPCSTR PassWord,
-			    LPCSTR LocalName)
-{
-   FIXME_(wnet)("('%s', %p, '%s'): stub\n",
-	 NetPath, PassWord, LocalName);
-   return WN_NO_NETWORK;
-}
-
-/* [MPR.51] */
-
-UINT WINAPI WNetAddConnectionW(LPCWSTR NetPath, 
-			    LPCWSTR PassWord,
-			    LPCWSTR LocalName)
-{
-   FIXME_(wnet)(" stub!\n");
-   SetLastError(WN_NO_NETWORK);
-   return WN_NO_NETWORK;
-}
-
-/* **************************************************************** 
- * WNetAddConnection2_32A [MPR.46] 
- */
-
-UINT WINAPI
-WNetAddConnection2A(LPNETRESOURCEA netresource, /* [in] */
-		       LPCSTR password,        /* [in] */     
-		       LPCSTR username,        /* [in] */
-		       DWORD flags             /* [in] */  )
-{
-   FIXME_(wnet)("(%p,%s,%s,0x%08lx), stub!\n", netresource,
-	 password, username, (unsigned long) flags);
-   SetLastError(WN_NO_NETWORK);
-   return WN_NO_NETWORK;
-}
-
-/* ****************************************************************
- * WNetAddConnection2W [MPR.47]
- */
+DEFAULT_DEBUG_CHANNEL(wnet)
 
-UINT WINAPI
-WNetAddConnection2W(LPNETRESOURCEW netresource, /* [in] */
-		       LPCWSTR password,        /* [in] */     
-		       LPCWSTR username,        /* [in] */
-		       DWORD flags              /* [in] */  )
-{
-   FIXME_(wnet)(", stub!\n");
-   SetLastError(WN_NO_NETWORK);
-   return WN_NO_NETWORK;
-}
-
-/* ****************************************************************
- * WNetAddConnection3_32A [MPR.48]
+/*
+ * Remote printing 
  */
 
-UINT WINAPI WNetAddConnection3A(HWND owner,
-		      LPNETRESOURCEA netresource,
-		      LPCSTR password,
-		      LPCSTR username,
-		      DWORD flags)
-{
-   TRACE_(wnet)("owner = 0x%x\n", owner);
-   return WNetAddConnection2A(netresource, 
-				 password, username, flags);
-}
-
-/* ****************************************************************
- * WNetAddConnection3W [MPR.49]
+/**************************************************************************
+ *              WNetOpenJob16       [USER.501]
  */
-
-UINT WINAPI WNetAddConnection3W(HWND owner,
-			      LPNETRESOURCEW netresource,
-			      LPCWSTR username,
-			      LPCWSTR password,
-			      DWORD flags)
+WORD WINAPI WNetOpenJob16( LPSTR szQueue, LPSTR szJobTitle, WORD nCopies, LPINT16 pfh )
 {
-   TRACE_(wnet)("owner = 0x%x\n", owner);
-   return WNetAddConnection2W(netresource, username, password,
-				 flags); 
-} 
-
-/*******************************************************************
- * WNetConnectionDialog1_32A [MPR.59]
- */
-UINT WINAPI WNetConnectionDialog1A (LPCONNECTDLGSTRUCTA lpConnDlgStruct)
-{ FIXME_(wnet)("%p stub\n", lpConnDlgStruct);   
-  SetLastError(WN_NO_NETWORK);
-  return ERROR_NO_NETWORK;
-}
-/*******************************************************************
- * WNetConnectionDialog1_32W [MPR.60]
- */ 
-UINT WINAPI WNetConnectionDialog1W (LPCONNECTDLGSTRUCTW lpConnDlgStruct)
-{ FIXME_(wnet)("%p stub\n", lpConnDlgStruct);
-  SetLastError(WN_NO_NETWORK);
-  return ERROR_NO_NETWORK;
+    FIXME( "(%s, %s, %d, %p): stub\n",
+           debugstr_a(szQueue), debugstr_a(szJobTitle), nCopies, pfh );
+    return WN16_NET_ERROR;
 }
- 
-/*******************************************************************
- * WNetConnectionDialog_32 [MPR.61]
- */ 
-UINT WINAPI WNetConnectionDialog(HWND owner, DWORD flags  )
-{ FIXME_(wnet)("owner = 0x%x, flags=0x%lx stub\n", owner,flags);
-  SetLastError(WN_NO_NETWORK);
-  return ERROR_NO_NETWORK;
 
-}
-
-/*******************************************************************
- * WNetEnumCachedPasswords32 [MPR.61]
+/**************************************************************************
+ *              WNetCloseJob16      [USER.502]
  */
-UINT WINAPI WNetEnumCachedPasswords(LPSTR sometext, DWORD count1,
-		DWORD res_nr, DWORD *enumPasswordProc)
+WORD WINAPI WNetCloseJob16( WORD fh, LPINT16 pidJob, LPSTR szQueue )
 {
-    return ERROR_NO_NETWORK;
+    FIXME( "(%d, %p, %s): stub\n", fh, pidJob, debugstr_a(szQueue) );
+    return WN16_NET_ERROR;
 }
 
-/********************************************************************
- *   WNetCancelConnection	[USER.518]  undirects a local device
+/**************************************************************************
+ *              WNetWriteJob16      [USER.524]
  */
-UINT16 WINAPI WNetCancelConnection16(LPCSTR lpName, BOOL16 bForce)
+WORD WINAPI WNetWriteJob16( HANDLE16 hJob, LPSTR lpData, LPINT16 lpcbData )
 {
-    FIXME_(wnet)("('%s', %04X): stub\n", lpName, bForce);
-    return WN_NO_NETWORK;
+    FIXME( "(%04x, %p, %p): stub\n", hJob, lpData, lpcbData );
+    return WN16_NET_ERROR;
 }
 
-
 /**************************************************************************
- *              WNetErrorText16       [USER.499]
+ *              WNetAbortJob16       [USER.503]
  */
-int WINAPI WNetErrorText16(WORD nError,LPSTR lpszText,WORD cbText)
+WORD WINAPI WNetAbortJob16( LPSTR szQueue, WORD wJobId )
 {
-        FIXME_(wnet)("(%x,%p,%x): stub\n",nError,lpszText,cbText);
-	return FALSE;
+    FIXME( "(%s, %d): stub\n", debugstr_a(szQueue), wJobId );
+    return WN16_NET_ERROR;
 }
 
 /**************************************************************************
- *              WNetOpenJob16       [USER.501]
+ *              WNetHoldJob16       [USER.504]
  */
-int WINAPI WNetOpenJob16(LPSTR szQueue,LPSTR szJobTitle,WORD nCopies,LPWORD pfh)
+WORD WINAPI WNetHoldJob16( LPSTR szQueue, WORD wJobId )
 {
-	FIXME_(wnet)("('%s','%s',%x,%p): stub\n",
-	      szQueue,szJobTitle,nCopies,pfh);
-	return WN_NET_ERROR;
+    FIXME( "(%s, %d): stub\n", debugstr_a(szQueue), wJobId );
+    return WN16_NET_ERROR;
 }
 
 /**************************************************************************
- *              WNetCloseJob       [USER.502]
+ *              WNetReleaseJob16       [USER.505]
  */
-int WINAPI WNetCloseJob16(WORD fh,LPWORD pidJob,LPSTR szQueue)
+WORD WINAPI WNetReleaseJob16( LPSTR szQueue, WORD wJobId )
 {
-	FIXME_(wnet)("(%x,%p,'%s'): stub\n",fh,pidJob,szQueue);
-	return WN_NET_ERROR;
+    FIXME( "(%s, %d): stub\n", debugstr_a(szQueue), wJobId );
+    return WN16_NET_ERROR;
 }
 
 /**************************************************************************
- *              WNetAbortJob       [USER.503]
+ *              WNetCancelJob16       [USER.506]
  */
-int WINAPI WNetAbortJob16(LPSTR szQueue,WORD wJobId)
+WORD WINAPI WNetCancelJob16( LPSTR szQueue, WORD wJobId )
 {
-	FIXME_(wnet)("('%s',%x): stub\n",szQueue,wJobId);
-	return WN_NET_ERROR;
+    FIXME( "(%s, %d): stub\n", debugstr_a(szQueue), wJobId );
+    return WN16_NET_ERROR;
 }
 
 /**************************************************************************
- *              WNetHoldJob       [USER.504]
+ *              WNetSetJobCopies16     [USER.507]
  */
-int WINAPI WNetHoldJob16(LPSTR szQueue,WORD wJobId)
+WORD WINAPI WNetSetJobCopies16( LPSTR szQueue, WORD wJobId, WORD nCopies )
 {
-	FIXME_(wnet)("('%s',%x): stub\n",szQueue,wJobId);
-	return WN_NET_ERROR;
+    FIXME( "(%s, %d, %d): stub\n", debugstr_a(szQueue), wJobId, nCopies );
+    return WN16_NET_ERROR;
 }
 
 /**************************************************************************
- *              WNetReleaseJob       [USER.505]
+ *              WNetWatchQueue16       [USER.508]
  */
-int WINAPI WNetReleaseJob16(LPSTR szQueue,WORD wJobId)
+WORD WINAPI WNetWatchQueue16( HWND16 hWnd, LPSTR szLocal, LPSTR szUser, WORD nQueue )
 {
-	FIXME_(wnet)("('%s',%x): stub\n",szQueue,wJobId);
-	return WN_NET_ERROR;
+    FIXME( "(%04x, %s, %s, %d): stub\n", 
+           hWnd, debugstr_a(szLocal), debugstr_a(szUser), nQueue );
+    return WN16_NET_ERROR;
 }
 
 /**************************************************************************
- *              WNetCancelJob       [USER.506]
+ *              WNetUnwatchQueue16     [USER.509]
  */
-int WINAPI WNetCancelJob16(LPSTR szQueue,WORD wJobId)
+WORD WINAPI WNetUnwatchQueue16( LPSTR szQueue )
 {
-	FIXME_(wnet)("('%s',%x): stub\n",szQueue,wJobId);
-	return WN_NET_ERROR;
+    FIXME( "(%s): stub\n", debugstr_a(szQueue) );
+    return WN16_NET_ERROR;
 }
 
 /**************************************************************************
- *              WNetSetJobCopies       [USER.507]
+ *              WNetLockQueueData16       [USER.510]
  */
-int WINAPI WNetSetJobCopies16(LPSTR szQueue,WORD wJobId,WORD nCopies)
+WORD WINAPI WNetLockQueueData16( LPSTR szQueue, LPSTR szUser, 
+                                 LPQUEUESTRUCT16 *lplpQueueStruct )
 {
-	FIXME_(wnet)("('%s',%x,%x): stub\n",szQueue,wJobId,nCopies);
-	return WN_NET_ERROR;
+    FIXME( "(%s, %s, %p): stub\n", 
+           debugstr_a(szQueue), debugstr_a(szUser), lplpQueueStruct );
+    return WN16_NET_ERROR;
 }
 
 /**************************************************************************
- *              WNetWatchQueue       [USER.508]
+ *              WNetUnlockQueueData16       [USER.511]
  */
-int WINAPI WNetWatchQueue16(HWND16 hWnd,LPSTR szLocal,LPSTR szUser,WORD nQueue)
+WORD WINAPI WNetUnlockQueueData16( LPSTR szQueue )
 {
-	FIXME_(wnet)("(%04x,'%s','%s',%x): stub\n",hWnd,szLocal,szUser,nQueue);
-	return WN_NET_ERROR;
+    FIXME( "(%s): stub\n", debugstr_a(szQueue) );
+    return WN16_NET_ERROR;
 }
 
-/**************************************************************************
- *              WNetUnwatchQueue       [USER.509]
+
+/*
+ * Connections
  */
-int WINAPI WNetUnwatchQueue16(LPSTR szQueue)
-{
-	FIXME_(wnet)("('%s'): stub\n", szQueue);
-	return WN_NET_ERROR;
-}
 
-/**************************************************************************
- *              WNetLockQueueData       [USER.510]
+/********************************************************************
+ *  WNetAddConnection16 [USER.517]  Directs a local device to net
+ * 
+ * Redirects a local device (either a disk drive or printer port)
+ * to a shared device on a remote server.
  */
-int WINAPI WNetLockQueueData16(LPSTR szQueue,LPSTR szUser,void *lplpQueueStruct)
-{
-	FIXME_(wnet)("('%s','%s',%p): stub\n",szQueue,szUser,lplpQueueStruct);
-	return WN_NET_ERROR;
+WORD WINAPI WNetAddConnection16( LPSTR lpNetPath, LPSTR lpPassWord,
+                                 LPSTR lpLocalName )
+{	
+   return WNetAddConnectionA( lpNetPath, lpPassWord, lpLocalName );
 }
 
-/**************************************************************************
- *              WNetUnlockQueueData       [USER.511]
+/********************************************************************
+ *   WNetCancelConnection16 [USER.518]  undirects a local device
  */
-int WINAPI WNetUnlockQueueData16(LPSTR szQueue)
+WORD WINAPI WNetCancelConnection16( LPSTR lpName, BOOL16 bForce )
 {
-	FIXME_(wnet)("('%s'): stub\n",szQueue);
-	return WN_NET_ERROR;
+    FIXME( "(%s, %04X): stub\n", debugstr_a(lpName), bForce);
+    return WN16_NOT_SUPPORTED;
 }
 
-
 /********************************************************************
  * WNetGetConnection16 [USER.512] reverse-resolves a local device
- *
- * RETURNS
- * - WN_BAD_LOCALNAME     lpLocalName makes no sense
- * - WN_NOT_CONNECTED     drive is a local drive
- * - WN_MORE_DATA         buffer isn't big enough
- * - WN_SUCCESS           success (net path in buffer)  
  */
-int WINAPI WNetGetConnection16(LPCSTR lpLocalName, 
-                               LPSTR lpRemoteName, UINT16 *cbRemoteName)
+WORD WINAPI WNetGetConnection16( LPSTR lpLocalName, 
+                                 LPSTR lpRemoteName, UINT16 *cbRemoteName )
 {
-    const char *path;
-
-    TRACE_(wnet)("local %s\n",lpLocalName);
-    if (lpLocalName[1] == ':')
-    {
-        int drive = toupper(lpLocalName[0]) - 'A';
-        switch(DRIVE_GetType(drive))
-        {
-        case TYPE_INVALID:
-            return WN_BAD_LOCALNAME;
-        case TYPE_NETWORK:
-            path = DRIVE_GetLabel(drive);
-            if (strlen(path) + 1 > *cbRemoteName)
-            {
-                *cbRemoteName = strlen(path) + 1;
-                return WN_MORE_DATA;
-            }
-            strcpy( lpRemoteName, path );
-            *cbRemoteName = strlen(lpRemoteName) + 1;
-            return WN_SUCCESS;
-	case TYPE_FLOPPY:
-	case TYPE_HD:
-	case TYPE_CDROM:
-	  TRACE_(wnet)("file is local\n");
-	  return WN_NOT_CONNECTED;
-	default:
-	    return WN_BAD_LOCALNAME;
-        }
-    }
-    return WN_BAD_LOCALNAME;
+    DWORD len = *cbRemoteName;
+    WORD retv = WNetGetConnectionA( lpLocalName, lpRemoteName, &len );
+    *cbRemoteName = (UINT16)len;
+    return retv;
 }
 
 /**************************************************************************
- *				WNetGetConnectionA	[MPR.70]
+ *              WNetRestoreConnection16       [USER.523]
  */
-DWORD WINAPI
-WNetGetConnectionA(LPCSTR localname,LPSTR remotename,LPDWORD buflen)
+WORD WINAPI WNetRestoreConnection16( HWND16 hwndOwner, LPSTR lpszDevice )
 {
-	UINT16	x;
-	DWORD	ret = WNetGetConnection16(localname,remotename,&x);
-	*buflen = x;
-	return ret;
+    FIXME( "(%04x, %s): stub\n", hwndOwner, debugstr_a(lpszDevice) );
+    return WN16_NOT_SUPPORTED;
 }
 
-/**************************************************************************
- *				WNetGetConnectionW	[MPR.72]
- */
-DWORD WINAPI
-WNetGetConnectionW(LPCWSTR localnameW,LPWSTR remotenameW,LPDWORD buflen)
-{
-	UINT16	x;
-	CHAR	buf[200];	
-	LPSTR	lnA = HEAP_strdupWtoA(GetProcessHeap(),0,localnameW);
-	DWORD	ret = WNetGetConnection16(lnA,buf,&x);
-
-	lstrcpyAtoW(remotenameW,buf);
-	*buflen=lstrlenW(remotenameW);
-	HeapFree(GetProcessHeap(),0,lnA);
-	return ret;
-}
 
-/**************************************************************************
- *				WNetGetCaps		[USER.513]
+/*
+ * Capabilities
  */
-int WINAPI WNetGetCaps16(WORD capability)
-{
-	switch (capability) {
-		case WNNC_SPEC_VERSION:
-		{
-			return 0x30a; /* WfW 3.11(and apparently other 3.1x) */
-		}
-		case WNNC_NET_TYPE:
-		/* hi byte = network type, 
-                   lo byte = network vendor (Netware = 0x03) [15 types] */
-		return WNNC_NET_MultiNet | WNNC_SUBNET_WinWorkgroups;
-
-		case WNNC_DRIVER_VERSION:
-		/* driver version of vendor */
-		return 0x100; /* WfW 3.11 */
-
-		case WNNC_USER:
-		/* 1 = WNetGetUser is supported */
-		return 1;
-
-		case WNNC_CONNECTION:
-		/* returns mask of the supported connection functions */
-		return	WNNC_CON_AddConnection|WNNC_CON_CancelConnection
-			|WNNC_CON_GetConnections/*|WNNC_CON_AutoConnect*/
-			|WNNC_CON_BrowseDialog|WNNC_CON_RestoreConnection;
-
-		case WNNC_PRINTING:
-		/* returns mask of the supported printing functions */
-		return	WNNC_PRT_OpenJob|WNNC_PRT_CloseJob|WNNC_PRT_HoldJob
-			|WNNC_PRT_ReleaseJob|WNNC_PRT_CancelJob
-			|WNNC_PRT_SetJobCopies|WNNC_PRT_WatchQueue
-			|WNNC_PRT_UnwatchQueue|WNNC_PRT_LockQueueData
-			|WNNC_PRT_UnlockQueueData|WNNC_PRT_AbortJob
-			|WNNC_PRT_WriteJob;
-
-		case WNNC_DIALOG:
-		/* returns mask of the supported dialog functions */
-		return	WNNC_DLG_DeviceMode|WNNC_DLG_BrowseDialog
-			|WNNC_DLG_ConnectDialog|WNNC_DLG_DisconnectDialog
-			|WNNC_DLG_ViewQueueDialog|WNNC_DLG_PropertyDialog
-			|WNNC_DLG_ConnectionDialog
-			/*|WNNC_DLG_PrinterConnectDialog
-			|WNNC_DLG_SharesDialog|WNNC_DLG_ShareAsDialog*/;
-
-		case WNNC_ADMIN:
-		/* returns mask of the supported administration functions */
-		/* not sure if long file names is a good idea */
-		  return	WNNC_ADM_GetDirectoryType
-		        /*|WNNC_ADM_DirectoryNotify*//*not yet supported*/
-			|WNNC_ADM_LongNames/*|WNNC_ADM_SetDefaultDrive*/;
-
-		case WNNC_ERROR:
-		/* returns mask of the supported error functions */
-		return	WNNC_ERR_GetError|WNNC_ERR_GetErrorText;
-
-		case WNNC_PRINTMGREXT:
-		/* returns the Print Manager version in major and 
-                   minor format if Print Manager functions are available */
-		return 0x30e; /* printman version of WfW 3.11 */
-
-		case 0xffff:
-		/* Win 3.11 returns HMODULE of network driver here
-		FIXME: what should we return ?
-		logonoff.exe needs it, msmail crashes with wrong value */
-		return 0;
-
-	default:
-		return 0;
-	}
-}
 
 /**************************************************************************
- *              WNetDeviceMode       [USER.514]
+ *		WNetGetCaps16		[USER.513]
  */
-int WINAPI WNetDeviceMode16(HWND16 hWndOwner)
+WORD WINAPI WNetGetCaps16( WORD capability )
 {
-	FIXME_(wnet)("(%04x): stub\n",hWndOwner);
-	return WN_NO_NETWORK;
+    switch (capability) 
+    {
+    case WNNC16_SPEC_VERSION:
+        return 0x30a; /* WfW 3.11 (and apparently other 3.1x) */
+
+    case WNNC16_NET_TYPE:
+        /* hi byte = network type, 
+           lo byte = network vendor (Netware = 0x03) [15 types] */
+        return WNNC16_NET_MultiNet | WNNC16_SUBNET_WinWorkgroups;
+
+    case WNNC16_DRIVER_VERSION:
+        /* driver version of vendor */
+        return 0x100; /* WfW 3.11 */
+
+    case WNNC16_USER:
+        /* 1 = WNetGetUser is supported */
+        return 1;
+
+    case WNNC16_CONNECTION:
+        /* returns mask of the supported connection functions */
+        return   WNNC16_CON_AddConnection | WNNC16_CON_CancelConnection
+               | WNNC16_CON_GetConnections /* | WNNC16_CON_AutoConnect */
+               | WNNC16_CON_BrowseDialog | WNNC16_CON_RestoreConnection;
+
+    case WNNC16_PRINTING:
+        /* returns mask of the supported printing functions */
+        return   WNNC16_PRT_OpenJob | WNNC16_PRT_CloseJob | WNNC16_PRT_HoldJob
+               | WNNC16_PRT_ReleaseJob | WNNC16_PRT_CancelJob
+               | WNNC16_PRT_SetJobCopies | WNNC16_PRT_WatchQueue
+               | WNNC16_PRT_UnwatchQueue | WNNC16_PRT_LockQueueData
+               | WNNC16_PRT_UnlockQueueData | WNNC16_PRT_AbortJob
+               | WNNC16_PRT_WriteJob;
+
+    case WNNC16_DIALOG:
+        /* returns mask of the supported dialog functions */
+        return   WNNC16_DLG_DeviceMode | WNNC16_DLG_BrowseDialog
+               | WNNC16_DLG_ConnectDialog | WNNC16_DLG_DisconnectDialog
+               | WNNC16_DLG_ViewQueueDialog | WNNC16_DLG_PropertyDialog
+               | WNNC16_DLG_ConnectionDialog
+            /* | WNNC16_DLG_PrinterConnectDialog
+               | WNNC16_DLG_SharesDialog | WNNC16_DLG_ShareAsDialog */;
+
+    case WNNC16_ADMIN:
+        /* returns mask of the supported administration functions */
+        /* not sure if long file names is a good idea */
+        return   WNNC16_ADM_GetDirectoryType
+            /* | WNNC16_ADM_DirectoryNotify */ /*not yet supported*/
+               | WNNC16_ADM_LongNames /* | WNNC16_ADM_SetDefaultDrive */;
+
+    case WNNC16_ERROR:
+        /* returns mask of the supported error functions */
+        return   WNNC16_ERR_GetError | WNNC16_ERR_GetErrorText;
+
+    case WNNC16_PRINTMGREXT:
+        /* returns the Print Manager version in major and 
+           minor format if Print Manager functions are available */
+        return 0x30e; /* printman version of WfW 3.11 */
+
+    case 0xffff:
+        /* Win 3.11 returns HMODULE of network driver here
+           FIXME: what should we return ?
+           logonoff.exe needs it, msmail crashes with wrong value */
+        return 0;
+
+    default:
+        return 0;
+    }
 }
 
-/**************************************************************************
- *              WNetBrowseDialog       [USER.515]
+
+/*
+ * Get User
  */
-int WINAPI WNetBrowseDialog16(HWND16 hParent,WORD nType,LPSTR szPath)
-{
-	FIXME_(wnet)("(%04x,%x,'%s'): stub\n",hParent,nType,szPath);
-	return WN_NO_NETWORK;
-}
 
 /**************************************************************************
- *				WNetGetUser			[USER.516]
+ *		WNetGetUser16			[USER.516]
  */
-UINT16 WINAPI WNetGetUser16(LPSTR lpLocalName, LPSTR lpUserName, DWORD *lpSize)
+WORD WINAPI WNetGetUser16( LPSTR szUser, LPINT16 nBufferSize )
 {
-	FIXME_(wnet)("(%p, %p, %p): stub\n", lpLocalName, lpUserName, lpSize);
-	return WN_NO_NETWORK;
+    FIXME( "(%p, %p): stub\n", szUser, nBufferSize );
+    return WN16_NOT_SUPPORTED;
 }
 
-/**************************************************************************
- *				WNetGetUser			[MPR.86]
- * FIXME: we should not return ourselves, but the owner of the drive lpLocalName
+
+/*
+ * Browsing
  */
-DWORD WINAPI WNetGetUserA(LPCSTR lpLocalName, LPSTR lpUserName, DWORD *lpSize)
-{
-	struct passwd	*pwd = getpwuid(getuid());
-
-	FIXME_(wnet)("(%s, %p, %p), mostly stub\n", lpLocalName, lpUserName, lpSize);
-	if (pwd) {
-		if (strlen(pwd->pw_name)+1>*lpSize) {
-			*lpSize = strlen(pwd->pw_name)+1;
-			SetLastError(ERROR_MORE_DATA);
-			return ERROR_MORE_DATA;
-		}
-		strcpy(lpUserName,pwd->pw_name);
-		if (lpSize)
-			*lpSize = strlen(pwd->pw_name)+1;
-		return WN_SUCCESS;
-	}
-	/* FIXME: wrong return value */
-	SetLastError(ERROR_NO_NETWORK);
-	return ERROR_NO_NETWORK;
-}
 
 /**************************************************************************
- *              WNetGetError       [USER.519]
+ *              WNetDeviceMode16       [USER.514]
  */
-int WINAPI WNetGetError16(LPWORD nError)
+WORD WINAPI WNetDeviceMode16( HWND16 hWndOwner )
 {
-	FIXME_(wnet)("(%p): stub\n",nError);
-	return WN_NO_NETWORK;
+    FIXME( "(%04x): stub\n", hWndOwner );
+    return WN16_NOT_SUPPORTED;
 }
 
 /**************************************************************************
- *              WNetGetErrorText       [USER.520]
+ *              WNetBrowseDialog16       [USER.515]
  */
-int WINAPI WNetGetErrorText16(WORD nError, LPSTR lpBuffer, LPWORD nBufferSize)
+WORD WINAPI WNetBrowseDialog16( HWND16 hParent, WORD nType, LPSTR szPath )
 {
-	FIXME_(wnet)("(%x,%p,%p): stub\n",nError,lpBuffer,nBufferSize);
-	return WN_NET_ERROR;
+    FIXME( "(%04x, %x, %s): stub\n", hParent, nType, szPath );
+    return WN16_NOT_SUPPORTED;
 }
 
-/**************************************************************************
- *              WNetRestoreConnection       [USER.523]
+/********************************************************************
+ *              WNetConnectDialog16       [USER.525]
  */
-int WINAPI WNetRestoreConnection16(HWND16 hwndOwner,LPSTR lpszDevice)
+WORD WINAPI WNetConnectDialog( HWND16 hWndParent, WORD iType )
 {
-	FIXME_(wnet)("(%04x,'%s'): stub\n",hwndOwner,lpszDevice);
-	return WN_NO_NETWORK;
+    FIXME( "(%04x, %x): stub\n", hWndParent, iType );
+    return WN16_SUCCESS;
 }
 
 /**************************************************************************
- *              WNetWriteJob       [USER.524]
+ *              WNetDisconnectDialog16       [USER.526]
  */
-int WINAPI WNetWriteJob16(HANDLE16 hJob,void *lpData,LPWORD lpcbData)
+WORD WINAPI WNetDisconnectDialog16( HWND16 hwndOwner, WORD iType )
 {
-	FIXME_(wnet)("(%04x,%p,%p): stub\n",hJob,lpData,lpcbData);
-	return WN_NO_NETWORK;
+    FIXME( "(%04x, %x): stub\n", hwndOwner, iType );
+    return WN16_NOT_SUPPORTED;
 }
 
-/********************************************************************
- *              WNetConnectDialog       [USER.525]
+/**************************************************************************
+ *              WnetConnectionDialog16     [USER.527]
  */
-UINT16 WINAPI WNetConnectDialog(HWND16 hWndParent, WORD iType)
+WORD WINAPI WNetConnectionDialog16( HWND16 hWndParent, WORD iType )
 {
-	FIXME_(wnet)("(%04x, %4X): stub\n", hWndParent, iType);
-	return WN_SUCCESS;
+    FIXME( "(%04x, %x): stub\n", hWndParent, iType );
+    return WN16_SUCCESS;
 }
 
 /**************************************************************************
- *              WNetDisconnectDialog       [USER.526]
+ *              WNetViewQueueDialog16       [USER.528]
  */
-int WINAPI WNetDisconnectDialog16(HWND16 hwndOwner, WORD iType)
+WORD WINAPI WNetViewQueueDialog16( HWND16 hwndOwner, LPSTR lpszQueue )
 {
-	FIXME_(wnet)("(%04x,%x): stub\n",hwndOwner,iType);
-	return WN_NO_NETWORK;
+    FIXME(" (%04x, %s): stub\n", hwndOwner, debugstr_a(lpszQueue) );
+    return WN16_NOT_SUPPORTED;
 }
 
 /**************************************************************************
- *              WnetConnectionDialog     [USER.527]
+ *              WNetPropertyDialog16       [USER.529]
  */
-UINT16 WINAPI WNetConnectionDialog16(HWND16 hWndParent, WORD iType)
+WORD WINAPI WNetPropertyDialog16( HWND16 hwndParent, WORD iButton,
+                                  WORD nPropSel, LPSTR lpszName, WORD nType )
 {
-	FIXME_(wnet)("(%04x, %4X): stub\n", hWndParent, iType);
-	return WN_SUCCESS;
+    FIXME( "(%04x, %x, %x, %s, %x ): stub\n",
+          hwndParent, iButton, nPropSel, debugstr_a(lpszName), nType );
+    return WN16_NOT_SUPPORTED;
 }
 
-
-
 /**************************************************************************
- *              WNetViewQueueDialog       [USER.528]
+ *              WNetGetPropertyText16       [USER.532]
  */
-int WINAPI WNetViewQueueDialog16(HWND16 hwndOwner,LPSTR lpszQueue)
+WORD WINAPI WNetGetPropertyText16( WORD iButton, WORD nPropSel, LPSTR lpszName,
+                                   LPSTR lpszButtonName, WORD cbButtonName, WORD nType )
 {
-	FIXME_(wnet)("(%04x,'%s'): stub\n",hwndOwner,lpszQueue);
-	return WN_NO_NETWORK;
+    FIXME( "(%04x, %04x, %s, %s, %04x): stub\n",
+           iButton, nPropSel, debugstr_a(lpszName), debugstr_a(lpszButtonName), nType);
+    return WN16_NOT_SUPPORTED;
 }
 
-/**************************************************************************
- *              WNetPropertyDialog       [USER.529]
+
+/*
+ * Admin
  */
-int WINAPI WNetPropertyDialog16(HWND16 hwndParent,WORD iButton,
-                              WORD nPropSel,LPSTR lpszName,WORD nType)
-{
-	FIXME_(wnet)("(%04x,%x,%x,'%s',%x): stub\n",
-	      hwndParent,iButton,nPropSel,lpszName,nType);
-	return WN_NO_NETWORK;
-}
 
 /*********************************************************************
- *  WNetGetDirectoryType [USER.530]  Decides whether resource is local
+ *  WNetGetDirectoryType16 [USER.530]  Decides whether resource is local
  *
  * RETURNS
  *    on success,  puts one of the following in *lpType:
  * - WNDT_NETWORK   on a network
  * - WNDT_LOCAL     local
  */
-int WINAPI WNetGetDirectoryType16(LPSTR lpName, LPINT16 lpType)
+WORD WINAPI WNetGetDirectoryType16( LPSTR lpName, LPINT16 lpType )
 {
-        UINT type = GetDriveTypeA(lpName);
-
-	if (type == DRIVE_DOESNOTEXIST)
-	  type = GetDriveTypeA(NULL);
-	*lpType = (type==DRIVE_REMOTE)?WNDT_NETWORK:WNDT_NORMAL;
-	TRACE_(wnet)("%s is %s\n",lpName,(*lpType==WNDT_NETWORK)?
-	      "WNDT_NETWORK":"WNDT_NORMAL");
-	return WN_SUCCESS;
-}
+    UINT type = GetDriveTypeA(lpName);
+    if ( type == DRIVE_DOESNOTEXIST )
+        type = GetDriveTypeA(NULL);
 
-/*****************************************************************
- *              WNetGetDirectoryTypeA     [MPR.109]
- */
+    *lpType = (type == DRIVE_REMOTE)? WNDT_NETWORK : WNDT_NORMAL;
 
-UINT WINAPI WNetGetDirectoryTypeA(LPSTR lpName,void *lpType)
-{
-   return WNetGetDirectoryType16(lpName, lpType);
+    TRACE( "%s is %s\n", debugstr_a(lpName), 
+           (*lpType == WNDT_NETWORK)? "WNDT_NETWORK" : "WNDT_NORMAL" );
+    return WN16_SUCCESS;
 }
 
 /**************************************************************************
- *              WNetDirectoryNotify       [USER.531]
+ *              WNetDirectoryNotify16       [USER.531]
  */
-int WINAPI WNetDirectoryNotify16(HWND16 hwndOwner,LPSTR lpDir,WORD wOper)
+WORD WINAPI WNetDirectoryNotify16( HWND16 hwndOwner, LPSTR lpDir, WORD wOper )
 {
-	FIXME_(wnet)("(%04x,%s,%s): stub\n",hwndOwner,
-	      lpDir,(wOper==WNDN_MKDIR)?
-	      "WNDN_MKDIR":(wOper==WNDN_MVDIR)?"WNDN_MVDIR":
-	      (wOper==WNDN_RMDIR)?"WNDN_RMDIR":"unknown");
-	return WN_NOT_SUPPORTED;
+    FIXME( "(%04x, %s, %s): stub\n", hwndOwner, debugstr_a(lpDir),
+           (wOper == WNDN_MKDIR)? "WNDN_MKDIR" :
+           (wOper == WNDN_MVDIR)? "WNDN_MVDIR" :
+           (wOper == WNDN_RMDIR)? "WNDN_RMDIR" : "unknown" );
+    return WN16_NOT_SUPPORTED;
 }
 
-/**************************************************************************
- *              WNetGetPropertyText       [USER.532]
- */
-int WINAPI WNetGetPropertyText16(WORD iButton, WORD nPropSel, LPSTR lpszName,
-                          LPSTR lpszButtonName, WORD cbButtonName, WORD nType)
-{
-	FIXME_(wnet)("(%04x,%04x,'%s','%s',%04x): stub\n",
-	      iButton,nPropSel,lpszName,lpszButtonName, nType);
-	return WN_NO_NETWORK;
-}
 
-
-/**************************************************************************
- *				WNetCloseEnum		[USER.???]
- */
-UINT16 WINAPI WNetCloseEnum(HANDLE16 hEnum)
-{
-	FIXME_(wnet)("(%04x): stub\n", hEnum);
-	return WN_NO_NETWORK;
-}
-
-/**************************************************************************
- *				WNetEnumResource	[USER.???]
- */
-UINT16 WINAPI WNetEnumResource(HANDLE16 hEnum, DWORD cRequ, 
-                               DWORD *lpCount, LPVOID lpBuf)
-{
-	FIXME_(wnet)("(%04x, %08lX, %p, %p): stub\n", 
-	      hEnum, cRequ, lpCount, lpBuf);
-	return WN_NO_NETWORK;
-}
-
-/**************************************************************************
- *				WNetOpenEnum		[USER.???]
+/*
+ * Error handling
  */
-UINT16 WINAPI WNetOpenEnum16(DWORD dwScope, DWORD dwType, 
-                             LPNETRESOURCE16 lpNet, HANDLE16 *lphEnum)
-{
-	FIXME_(wnet)("(%08lX, %08lX, %p, %p): stub\n",
-	      dwScope, dwType, lpNet, lphEnum);
-	return WN_NO_NETWORK;
-}
 
 /**************************************************************************
- *				WNetOpenEnumA		[MPR.92]
+ *              WNetGetError16       [USER.519]
  */
-UINT WINAPI WNetOpenEnumA(DWORD dwScope, DWORD dwType, DWORD dwUsage,
-                              LPNETRESOURCEA lpNet, HANDLE *lphEnum)
+WORD WINAPI WNetGetError16( LPINT16 nError )
 {
-	FIXME_(wnet)("(%08lX, %08lX, %08lX, %p, %p): stub\n",
-	      dwScope, dwType, dwUsage, lpNet, lphEnum);
-	SetLastError(WN_NO_NETWORK);
-	return WN_NO_NETWORK;
+    FIXME( "(%p): stub\n", nError );
+    return WN16_NOT_SUPPORTED;
 }
 
 /**************************************************************************
- *                             WNetOpenEnumW           [MPR.93]
+ *              WNetGetErrorText16       [USER.520]
  */
-UINT WINAPI WNetOpenEnumW(DWORD dwScope, DWORD dwType, DWORD dwUsage,
-                              LPNETRESOURCEA lpNet, HANDLE *lphEnum)
+WORD WINAPI WNetGetErrorText16( WORD nError, LPSTR lpBuffer, LPINT16 nBufferSize )
 {
-       FIXME_(wnet)("(%08lX, %08lX, %08lX, %p, %p): stub\n",
-             dwScope, dwType, dwUsage, lpNet, lphEnum);
-       SetLastError(WN_NO_NETWORK);
-       return WN_NO_NETWORK;
-}
-
-/* ****************************************************************
- *    WNetGetResourceInformationA [MPR.80]
- * */
-
-DWORD WINAPI 
-WNetGetResourceInformationA(
-	LPNETRESOURCEA netres,LPVOID buf,LPDWORD buflen,LPSTR systemstr
-) {
-	FIXME_(wnet)("(%p,%p,%p,%p): stub!\n",netres,buf,buflen,systemstr);
-  SetLastError(WN_NO_NETWORK);
-	return WN_NO_NETWORK;
+    FIXME( "(%x, %p, %p): stub\n", nError, lpBuffer, nBufferSize );
+    return WN16_NET_ERROR;
 }
 
 /**************************************************************************
- * WNetCachePassword [MPR.52]  Saves password in cache
- *
- * RETURNS
- *    Success: WN_SUCCESS
- *    Failure: WNACCESS_DENIED, WN_BAD_PASSWORD, WN_BADVALUE, WN_NET_ERROR,
- *             WN_NOT_SUPPORTED, WN_OUT_OF_MEMORY
- */
-DWORD WINAPI WNetCachePassword(
-    LPSTR pbResource, /* [in] Name of workgroup, computer, or resource */
-    WORD cbResource,  /* [in] Size of name */
-    LPSTR pbPassword, /* [in] Buffer containing password */
-    WORD cbPassword,  /* [in] Size of password */
-    BYTE nType)       /* [in] Type of password to cache */
-{
-    FIXME_(mpr)("(%s,%d,%s,%d,%d): stub\n", pbResource,cbResource,
-          pbPassword,cbPassword,nType);
-    return WN_SUCCESS;
-}
-
-
-
-/*****************************************************************
- * WNetGetCachedPassword [MPR.69]  Retrieves password from cache
- *
- * RETURNS
- *    Success: WN_SUCCESS
- *    Failure: WNACCESS_DENIED, WN_BAD_PASSWORD, WN_BAD_VALUE, 
- *             WN_NET_ERROR, WN_NOT_SUPPORTED, WN_OUT_OF_MEMORY
- */
-DWORD WINAPI WNetGetCachedPassword(
-    LPSTR pbResource,   /* [in]  Name of workgroup, computer, or resource */
-    WORD cbResource,    /* [in]  Size of name */
-    LPSTR pbPassword,   /* [out] Buffer to receive password */
-    LPWORD pcbPassword, /* [out] Receives size of password */
-    BYTE nType)         /* [in]  Type of password to retrieve */
-{
-    FIXME_(mpr)("(%s,%d,%p,%d,%d): stub\n",
-          pbResource,cbResource,pbPassword,*pcbPassword,nType);
-    return WN_ACCESS_DENIED;
-}
-
-/*****************************************************************
- *     MultinetGetConnectionPerformanceA [MPR.25]
- *
- * RETURNS
- *    Success: NO_ERROR
- *    Failure: ERROR_NOT_SUPPORTED, ERROR_NOT_CONNECTED,
- *             ERROR_NO_NET_OR_BAD_PATH, ERROR_BAD_DEVICE,
- *             ERROR_BAD_NET_NAME, ERROR_INVALID_PARAMETER, 
- *             ERROR_NO_NETWORK, ERROR_EXTENDED_ERROR
- */
-DWORD WINAPI MultinetGetConnectionPerformanceA(
-	LPNETRESOURCEA lpNetResource,
-	LPNETCONNECTINFOSTRUCT lpNetConnectInfoStruct
-) {
-	FIXME_(mpr)("(%p,%p): stub\n",lpNetResource,lpNetConnectInfoStruct);
-	return WN_NO_NETWORK;
-}
-
-
-/*****************************************************************
- *  MultinetGetErrorTextA [MPR.28]
- */
-
-UINT WINAPI MultinetGetErrorTextA (DWORD x, DWORD y, DWORD z)
-{	FIXME_(mpr)("(%lx,%lx,%lx): stub\n",x,y,z);
-  return 0;
-}
-
-/*****************************************************************
- *  MultinetGetErrorTextW [MPR.29]
- */
-UINT WINAPI MultinetGetErrorTextW (DWORD x, DWORD y, DWORD z)
-{	FIXME_(mpr)("(%lx,%lx,%lx): stub\n",x,y,z);
-  return 0;
-}
-
-/*****************************************************************
- *  NPSGetProviderHandle [MPR.33]
- */
-DWORD WINAPI NPSGetProviderHandleA(DWORD x) {
-	FIXME_(mpr)("(0x%08lx),stub!\n",x);
-	return 0;
-}
-
-/****************************************************************
- * NPSGetProviderNameA [MPR.35]
- * 'DWORD x' replaces 'HPROVIDER hProvider'
- * FAR omitted in lpszProviderName def
- */
-DWORD WINAPI NPSGetProviderNameA(
-            DWORD x,
-            LPCSTR * lpszProviderName) {
-           FIXME_(mpr)("(0x%08lx),stub!\n",x);
-/*            return WN_SUCCESS;
-*/
-              return WN_BAD_HANDLE;
-}
-
-/*****************************************************************
- *  NPSGetSectionNameA [MPR.36]
- *  'DWORD x'  replaces 'HPROVIDER hProvider'
- *  FAR omitted in lpszSectionName def
- */
-DWORD WINAPI NPSGetSectionNameA(
-            DWORD x,
-            LPCSTR  * lpszSectionName) {
-       FIXME_(mpr)("(0x%08lx),stub!\n",x);
-/*       return WN_SUCCESS;
-*/
-         return WN_BAD_HANDLE;
-}
-
-/*****************************************************************
- *  WNetCancelConnection232A [MPR.53]
- */
-DWORD WINAPI WNetCancelConnection2A(
-  LPCSTR lpName, 
-  DWORD dwFlags, 
-  BOOL fForce) {
-
-  FIXME_(wnet)(": stub\n");
-  return WN_SUCCESS;
-}
-
-/*****************************************************************
- *  WNetCancelConnection232W [MPR.54]
- */
-DWORD WINAPI WNetCancelConnection2W(
-  LPCWSTR lpName, 
-  DWORD dwFlags, 
-  BOOL fForce) {
-
-  FIXME_(wnet)(": stub\n");
-  return WN_SUCCESS;
-}
-
-/*****************************************************************
- *  WNetCancelConnection32A [MPR.55]
- */
-DWORD WINAPI WNetCancelConnectionA(
-  LPCSTR lpName, 
-  BOOL fForce) {
-
-  FIXME_(wnet)(": stub\n");
-  return WN_SUCCESS;
-}
-
-/*****************************************************************
- *  WNetCancelConnection32W [MPR.56]
- */
-DWORD WINAPI WNetCancelConnectionW(
-  LPCWSTR lpName, 
-  BOOL fForce) {
-
-  FIXME_(wnet)(": stub\n");
-  return WN_SUCCESS;
-}
-
-/*****************************************************************
- *  WNetGetUser32W [MPR.87]
- */
-DWORD WINAPI WNetGetUserW(
-  LPCWSTR  lpName,
-  LPWSTR   lpUserName,
-  LPDWORD  lpnLength) {
-
-  FIXME_(wnet)(": stub\n");
-       SetLastError(WN_NO_NETWORK);
-  return WN_NO_NETWORK;
-}
-
-/*****************************************************************
- *  WNetGetProviderNameA [MPR.79]
- */
-DWORD WINAPI WNetGetProviderNameA(
-  DWORD dwNetType,
-  LPSTR lpProvider,
-  LPDWORD lpBufferSize) 
-{
-    FIXME_(wnet)(": stub\n");
-    SetLastError(WN_NO_NETWORK);
-    return WN_NO_NETWORK;
-}
-
-/*****************************************************************
- *  WNetGetProviderNameW [MPR.80]
- */
-DWORD WINAPI WNetGetProviderNameW(
-  DWORD dwNetType,
-  LPWSTR lpProvider,
-  LPDWORD lpBufferSize) 
-{
-    FIXME_(wnet)(": stub\n");
-    SetLastError(WN_NO_NETWORK);
-    return WN_NO_NETWORK;
-}
-
-/*****************************************************************
- *  WNetRemoveCachedPassword [MPR.95]
- */
-
-UINT WINAPI WNetRemoveCachedPassword (DWORD x, DWORD y, DWORD z)
-{	FIXME_(mpr)("(%lx,%lx,%lx): stub\n",x,y,z);
-  return 0;
-}
-
-/*****************************************************************
- *  WNetUseConnectionA [MPR.100]
- */
-DWORD WINAPI WNetUseConnectionA(
-  HWND hwndOwner,
-  LPNETRESOURCEA lpNetResource,
-  LPSTR lpPassword,
-  LPSTR lpUserID,
-  DWORD dwFlags,
-  LPSTR lpAccessName,
-  LPDWORD lpBufferSize,
-  LPDWORD lpResult)
-{
-    FIXME_(wnet)(": stub\n");
-    SetLastError(WN_NO_NETWORK);
-    return WN_NO_NETWORK;
-}
-
-/*****************************************************************
- *  WNetUseConnectionW [MPR.101]
- */
-DWORD WINAPI WNetUseConnectionW(
-  HWND hwndOwner,
-  LPNETRESOURCEW lpNetResource,
-  LPWSTR lpPassword,
-  LPWSTR lpUserID,
-  DWORD dwFlags,
-  LPWSTR lpAccessName,
-  LPDWORD lpBufferSize,
-  LPDWORD lpResult)
-{
-    FIXME_(wnet)(": stub\n");
-    SetLastError(WN_NO_NETWORK);
-    return WN_NO_NETWORK;
-}
-
-
- /* 
-  * FIXME: The following routines should use a private heap ...
-  */
-
-/*****************************************************************
- *  MPR_Alloc  [MPR.22]
- */
-LPVOID WINAPI MPR_Alloc( DWORD dwSize )
-{
-    return HeapAlloc( SystemHeap, HEAP_ZERO_MEMORY, dwSize );
-}
-
-/*****************************************************************
- *  MPR_ReAlloc  [MPR.23]
- */
-LPVOID WINAPI MPR_ReAlloc( LPVOID lpSrc, DWORD dwSize )
-{
-    if ( lpSrc )
-        return HeapReAlloc( SystemHeap, HEAP_ZERO_MEMORY, lpSrc, dwSize );
-    else
-        return HeapAlloc( SystemHeap, HEAP_ZERO_MEMORY, dwSize );
-}
-
-/*****************************************************************
- *  MPR_Free  [MPR.24]
- */
-BOOL WINAPI MPR_Free( LPVOID lpMem )
-{
-    if ( lpMem )
-        return HeapFree( SystemHeap, 0, lpMem );
-    else
-        return FALSE;
-}
-
-/*****************************************************************
- *  [MPR.25]
+ *              WNetErrorText16       [USER.499]
  */
-BOOL WINAPI _MPR_25( LPBYTE lpMem, INT len )
+WORD WINAPI WNetErrorText16( WORD nError, LPSTR lpszText, WORD cbText )
 {
-    FIXME_(mpr)( "(%p, %d): stub\n", lpMem, len );
-
+    FIXME("(%x, %p, %x): stub\n", nError, lpszText, cbText );
     return FALSE;
 }
 
-/*****************************************************************
- *  [MPR.85]
- */
-DWORD WINAPI WNetGetUniversalNameA ( LPCSTR lpLocalPath, DWORD dwInfoLevel, LPVOID lpBuffer, LPDWORD lpBufferSize )
-{
-	FIXME_(mpr)( "(%s, 0x%08lx, %p, %p): stub\n", lpLocalPath, dwInfoLevel, lpBuffer, lpBufferSize);
-
-	SetLastError(WN_NO_NETWORK);
-	return WN_NO_NETWORK;
-}
-
-/*****************************************************************
- *  [MPR.86]
- */
-DWORD WINAPI WNetGetUniversalNameW ( LPCWSTR lpLocalPath, DWORD dwInfoLevel, LPVOID lpBuffer, LPDWORD lpBufferSize )
-{
-	FIXME_(mpr)( "(%s, 0x%08lx, %p, %p): stub\n", debugstr_w(lpLocalPath), dwInfoLevel, lpBuffer, lpBufferSize);
-
-	SetLastError(WN_NO_NETWORK);
-	return WN_NO_NETWORK;
-}
diff --git a/relay32/.cvsignore b/relay32/.cvsignore
index 7964d05a72b..31de0665d63 100644
--- a/relay32/.cvsignore
+++ b/relay32/.cvsignore
@@ -12,7 +12,6 @@ mciavi.spec.c
 mcicda.spec.c
 mciseq.spec.c
 mciwave.spec.c
-mpr.spec.c
 ole32.spec.c
 oleaut32.spec.c
 olecli32.spec.c
diff --git a/relay32/Makefile.in b/relay32/Makefile.in
index cf9df589e3c..93137d30371 100644
--- a/relay32/Makefile.in
+++ b/relay32/Makefile.in
@@ -13,7 +13,6 @@ SPEC_SRCS = \
 	dsound.spec \
 	gdi32.spec \
 	kernel32.spec \
-	mpr.spec \
 	mcianim.spec \
 	mciavi.spec \
 	mcicda.spec \
-- 
GitLab