--- /dev/null
+PATH_TO_TOP = ../..
+
+TARGET_TYPE = dynlink
+
+TARGET_NAME = mpr
+
+TARGET_BASE = 0x701a0000
+
+TARGET_CFLAGS = -fno-builtin
+
+# require os code to explicitly request A/W version of structs/functions
+TARGET_CFLAGS += -DUNICODE -D_UNICODE -Wall -Werror
+
+TARGET_LFLAGS = -nostdlib -nostartfiles
+
+TARGET_SDKLIBS = kernel32.a ntdll.a user32.a advapi32.a ole32.a
+
+TARGET_OBJECTS = \
+ ../Uuid/uuid.o \
+ auth.o \
+ multinet.o \
+ nps.o \
+ pwcache.o \
+ wnet.o \
+
+DEP_OBJECTS = $(TARGET_OBJECTS)
+
+include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
+
+include $(TOOLS_PATH)/depend.mk
+
+# EOF
--- /dev/null
+/*
+ * MPR Authentication and Logon functions
+ *
+ * Copyright 1999 Ulrich Weigand
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+//#include <winbase.h>
+//#include <winnetwk.h>
+#include <windows.h>
+
+/*****************************************************************
+ * WNetLogoffA [MPR.@]
+ */
+DWORD WINAPI WNetLogoffA( LPCSTR lpProvider, HWND hwndOwner )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}
+
+/*****************************************************************
+ * WNetLogoffW [MPR.@]
+ */
+DWORD WINAPI WNetLogoffW( LPCWSTR lpProvider, HWND hwndOwner )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}
+
+/*****************************************************************
+ * WNetLogonA [MPR.@]
+ */
+DWORD WINAPI WNetLogonA( LPCSTR lpProvider, HWND hwndOwner )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}
+
+/*****************************************************************
+ * WNetLogonW [MPR.@]
+ */
+DWORD WINAPI WNetLogonW( LPCWSTR lpProvider, HWND hwndOwner )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}
+
+/*****************************************************************
+ * WNetVerifyPasswordA [MPR.@]
+ */
+DWORD WINAPI WNetVerifyPasswordA( LPCSTR lpszPassword, BOOL *pfMatch )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}
+
+/*****************************************************************
+ * WNetVerifyPasswordW [MPR.@]
+ */
+DWORD WINAPI WNetVerifyPasswordW( LPCWSTR lpszPassword, BOOL *pfMatch )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}
--- /dev/null
+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;
+
+typedef struct
+{
+ DWORD cbStructure;
+ DWORD dwNotifyStatus;
+ DWORD dwOperationStatus;
+ LPVOID lpNPContext;
+
+} NOTIFYINFO, *LPNOTIFYINFO;
+
+typedef struct tagPASSWORD_CACHE_ENTRY {
+ WORD cbEntry;
+ WORD cbResource;
+ WORD cbPassword;
+ BYTE iEntry;
+ BYTE nType;
+ BYTE abResource[1];
+} PASSWORD_CACHE_ENTRY;
+
+enum NOTIFYTYPE { NotifyAddConnection,
+ NotifyCancelConnection,
+ NotifyGetConnectionPerformance };
+
+#define HPROVIDER LPVOID
+#define WN_NOT_SUPPORTED 0x0001
+#define WN_NOT_CONNECTED ERROR_NOT_CONNECTED
+#define WN_BAD_LOCALNAME ERROR_BAD_DEVICE
+typedef HPROVIDER *PHPROVIDER;
+typedef DWORD (CALLBACK *NOTIFYCALLBACK)(LPNOTIFYINFO,LPVOID);
+typedef BOOL (CALLBACK *ENUMPASSWORDPROC)(PASSWORD_CACHE_ENTRY *, DWORD);
--- /dev/null
+/*\r
+ * ReactOS Cards\r
+ *\r
+ * Copyright (C) 2003 Filip Navara <xnavara@volny.org>\r
+ *\r
+ * This library is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU Lesser General Public\r
+ * License as published by the Free Software Foundation; either\r
+ * version 2.1 of the License, or (at your option) any later version.\r
+ *\r
+ * This library is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
+ * Lesser General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU Lesser General Public\r
+ * License along with this library; if not, write to the Free Software\r
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
+ */\r
+\r
+#include <windows.h>\r
+#include <reactos/resource.h>\r
+\r
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US\r
+\r
+VS_VERSION_INFO VERSIONINFO\r
+ FILEVERSION 0,3,0,0\r
+ PRODUCTVERSION RES_UINT_PV_MAJOR,RES_UINT_PV_MINOR,RES_UINT_PV_REVISION,RES_UINT_PV_BUILD\r
+ FILEFLAGSMASK 0x3fL\r
+#ifdef _DEBUG\r
+ FILEFLAGS 0x1L\r
+#else\r
+ FILEFLAGS 0x0L\r
+#endif\r
+ FILEOS 0x40004L\r
+ FILETYPE 0x2L\r
+ FILESUBTYPE 0x0L\r
+BEGIN\r
+ BLOCK "StringFileInfo"\r
+ BEGIN\r
+ BLOCK "040904b0"\r
+ BEGIN\r
+ VALUE "CompanyName", RES_STR_COMPANY_NAME\r
+ VALUE "FileDescription", "MPR DLL\0"\r
+ VALUE "FileVersion", "0.3.0.0\0"\r
+ VALUE "InternalName", "mpr\0"\r
+ VALUE "LegalCopyright", RES_STR_LEGAL_COPYRIGHT\r
+ VALUE "OriginalFilename", "mpr.dll\0"\r
+ VALUE "ProductName", RES_STR_PRODUCT_NAME\r
+ VALUE "ProductVersion", RES_STR_PRODUCT_VERSION\r
+ END\r
+ END\r
+ BLOCK "VarFileInfo"\r
+ BEGIN\r
+ VALUE "Translation", 0x409, 1200\r
+ END\r
+END\r
--- /dev/null
+/*
+ * MPR undocumented functions
+ *
+ * Copyright 1999 Ulrich Weigand
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "winbase.h"
+#include "winnetwk.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(mpr);
+
+ /*
+ * FIXME: The following routines should use a private heap ...
+ */
+
+/*****************************************************************
+ * @ [MPR.22]
+ */
+LPVOID WINAPI MPR_Alloc( DWORD dwSize )
+{
+ return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, dwSize );
+}
+
+/*****************************************************************
+ * @ [MPR.23]
+ */
+LPVOID WINAPI MPR_ReAlloc( LPVOID lpSrc, DWORD dwSize )
+{
+ if ( lpSrc )
+ return HeapReAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, lpSrc, dwSize );
+ else
+ return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, dwSize );
+}
+
+/*****************************************************************
+ * @ [MPR.24]
+ */
+BOOL WINAPI MPR_Free( LPVOID lpMem )
+{
+ if ( lpMem )
+ return HeapFree( GetProcessHeap(), 0, lpMem );
+ else
+ return FALSE;
+}
+
+/*****************************************************************
+ * @ [MPR.25]
+ */
+BOOL WINAPI _MPR_25( LPBYTE lpMem, INT len )
+{
+ FIXME( "(%p, %d): stub\n", lpMem, len );
+
+ return FALSE;
+}
+
+/*****************************************************************
+ * DllCanUnloadNow [MPR.@]
+ */
+DWORD WINAPI DllCanUnloadNow(void)
+{
+ FIXME("Stub\n");
+ return S_OK;
+}
--- /dev/null
+/*
+ * MPR Multinet functions
+ *
+ * Copyright 1999 Ulrich Weigand
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <windows.h>
+
+
+/*****************************************************************
+ * MultinetGetConnectionPerformanceA [MPR.@]
+ *
+ * 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 )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}
+
+/*****************************************************************
+ * MultinetGetConnectionPerformanceW [MPR.@]
+ */
+DWORD WINAPI MultinetGetConnectionPerformanceW(
+ LPNETRESOURCEW lpNetResource,
+ LPNETCONNECTINFOSTRUCT lpNetConnectInfoStruct )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}
+
+/*****************************************************************
+ * MultinetGetErrorTextA [MPR.@]
+ */
+DWORD WINAPI MultinetGetErrorTextA( DWORD x, DWORD y, DWORD z )
+{
+ return 0;
+}
+
+/*****************************************************************
+ * MultinetGetErrorTextW [MPR.@]
+ */
+DWORD WINAPI MultinetGetErrorTextW( DWORD x, DWORD y, DWORD z )
+{
+ return 0;
+}
+
--- /dev/null
+/*
+ * MPR Network Provider Services functions
+ *
+ * Copyright 1999 Ulrich Weigand
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <windows.h>
+#include "mpr.h"
+
+/*****************************************************************
+ * NPSAuthenticationDialogA [MPR.@]
+ */
+DWORD WINAPI NPSAuthenticationDialogA( LPAUTHDLGSTRUCTA lpAuthDlgStruct )
+{
+ return WN_NOT_SUPPORTED;
+}
+
+/*****************************************************************
+ * NPSGetProviderHandleA [MPR.@]
+ */
+DWORD WINAPI NPSGetProviderHandleA( PHPROVIDER phProvider )
+{
+ return WN_NOT_SUPPORTED;
+}
+
+/*****************************************************************
+ * NPSGetProviderNameA [MPR.@]
+ */
+DWORD WINAPI NPSGetProviderNameA( HPROVIDER hProvider, LPCSTR *lpszProviderName )
+{
+ return WN_NOT_SUPPORTED;
+}
+
+/*****************************************************************
+ * NPSGetSectionNameA [MPR.@]
+ */
+DWORD WINAPI NPSGetSectionNameA( HPROVIDER hProvider, LPCSTR *lpszSectionName )
+{
+ return WN_NOT_SUPPORTED;
+}
+
+/*****************************************************************
+ * NPSSetExtendedErrorA [MPR.@]
+ */
+DWORD WINAPI NPSSetExtendedErrorA( DWORD NetSpecificError, LPSTR lpExtendedErrorText )
+{
+ return WN_NOT_SUPPORTED;
+}
+
+/*****************************************************************
+ * NPSSetCustomTextA [MPR.@]
+ */
+VOID WINAPI NPSSetCustomTextA( LPSTR lpCustomErrorText )
+{
+}
+
+/*****************************************************************
+ * NPSCopyStringA [MPR.@]
+ */
+DWORD WINAPI NPSCopyStringA( LPCSTR lpString, LPVOID lpBuffer, LPDWORD lpdwBufferSize )
+{
+ return WN_NOT_SUPPORTED;
+}
+
+/*****************************************************************
+ * NPSDeviceGetNumberA [MPR.@]
+ */
+DWORD WINAPI NPSDeviceGetNumberA( LPSTR lpLocalName, LPDWORD lpdwNumber, LPDWORD lpdwType )
+{
+ return WN_NOT_SUPPORTED;
+}
+
+/*****************************************************************
+ * NPSDeviceGetStringA [MPR.@]
+ */
+DWORD WINAPI NPSDeviceGetStringA( DWORD dwNumber, DWORD dwType, LPSTR lpLocalName, LPDWORD lpdwBufferSize )
+{
+ return WN_NOT_SUPPORTED;
+}
+
+/*****************************************************************
+ * NPSNotifyRegisterA [MPR.@]
+ */
+DWORD WINAPI NPSNotifyRegisterA( enum NOTIFYTYPE NotifyType, NOTIFYCALLBACK pfNotifyCallBack )
+{
+ return WN_NOT_SUPPORTED;
+}
+
+/*****************************************************************
+ * NPSNotifyGetContextA [MPR.@]
+ */
+LPVOID WINAPI NPSNotifyGetContextA( NOTIFYCALLBACK pfNotifyCallBack )
+{
+ return NULL;
+}
+
--- /dev/null
+/*
+ * MPR Password Cache functions
+ *
+ * Copyright 1999 Ulrich Weigand
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <windows.h>
+#include "mpr.h"
+/**************************************************************************
+ * WNetCachePassword [MPR.@] Saves password in cache
+ *
+ * NOTES
+ * only the parameter count is verifyed
+ *
+ * ---- everything below this line might be wrong (js) -----
+ * 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 */
+ WORD x)
+
+{
+ return WN_NOT_SUPPORTED;
+}
+
+/*****************************************************************
+ * WNetRemoveCachedPassword [MPR.@]
+ */
+UINT WINAPI WNetRemoveCachedPassword( LPSTR pbResource, WORD cbResource,
+ BYTE nType )
+{
+ return WN_NOT_SUPPORTED;
+}
+
+/*****************************************************************
+ * WNetGetCachedPassword [MPR.@] Retrieves password from cache
+ *
+ * NOTES
+ * the stub seems to be wrong:
+ * arg1: ptr 0x40xxxxxx -> (no string)
+ * arg2: len 36
+ * arg3: ptr 0x40xxxxxx -> (no string)
+ * arg4: ptr 0x40xxxxxx -> 0xc8
+ * arg5: type? 4
+ *
+ * ---- everything below this line might be wrong (js) -----
+ * 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 */
+{
+ return WN_NOT_SUPPORTED;
+}
+
+/*******************************************************************
+ * WNetEnumCachedPasswords [MPR.@]
+ *
+ * NOTES
+ * the parameter count is verifyed
+ *
+ * observed values:
+ * arg1 ptr 0x40xxxxxx -> (no string)
+ * arg2 int 32
+ * arg3 type? 4
+ * arg4 enumPasswordProc (verifyed)
+ * arg5 ptr 0x40xxxxxx -> 0x0
+ *
+ * ---- everything below this line might be wrong (js) -----
+ */
+
+UINT WINAPI WNetEnumCachedPasswords( LPSTR pbPrefix, WORD cbPrefix,
+ BYTE nType, ENUMPASSWORDPROC enumPasswordProc, DWORD x)
+{
+ return WN_NOT_SUPPORTED;
+}
--- /dev/null
+/*
+ * MPR WNet functions
+ *
+ * Copyright 1999 Ulrich Weigand
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <ctype.h>
+#include <string.h>
+#include <sys/types.h>
+#include <windows.h>
+#include <mpr.h>
+
+/*
+ * Browsing Functions
+ */
+
+/*********************************************************************
+ * WNetOpenEnumA [MPR.@]
+ */
+DWORD WINAPI WNetOpenEnumA( DWORD dwScope, DWORD dwType, DWORD dwUsage,
+ LPNETRESOURCEA lpNet, LPHANDLE lphEnum )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetOpenEnumW [MPR.@]
+ */
+DWORD WINAPI WNetOpenEnumW( DWORD dwScope, DWORD dwType, DWORD dwUsage,
+ LPNETRESOURCEW lpNet, LPHANDLE lphEnum )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetEnumResourceA [MPR.@]
+ */
+DWORD WINAPI WNetEnumResourceA( HANDLE hEnum, LPDWORD lpcCount,
+ LPVOID lpBuffer, LPDWORD lpBufferSize )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetEnumResourceW [MPR.@]
+ */
+DWORD WINAPI WNetEnumResourceW( HANDLE hEnum, LPDWORD lpcCount,
+ LPVOID lpBuffer, LPDWORD lpBufferSize )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetCloseEnum [MPR.@]
+ */
+DWORD WINAPI WNetCloseEnum( HANDLE hEnum )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetGetResourceInformationA [MPR.@]
+ */
+DWORD WINAPI WNetGetResourceInformationA( LPNETRESOURCEA lpNetResource,
+ LPVOID lpBuffer, LPDWORD cbBuffer,
+ LPSTR *lplpSystem )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetGetResourceInformationW [MPR.@]
+ */
+DWORD WINAPI WNetGetResourceInformationW( LPNETRESOURCEW lpNetResource,
+ LPVOID lpBuffer, LPDWORD cbBuffer,
+ LPWSTR *lplpSystem )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetGetResourceParentA [MPR.@]
+ */
+DWORD WINAPI WNetGetResourceParentA( LPNETRESOURCEA lpNetResource,
+ LPVOID lpBuffer, LPDWORD lpBufferSize )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetGetResourceParentW [MPR.@]
+ */
+DWORD WINAPI WNetGetResourceParentW( LPNETRESOURCEW lpNetResource,
+ LPVOID lpBuffer, LPDWORD lpBufferSize )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}
+
+
+
+/*
+ * Connection Functions
+ */
+
+/*********************************************************************
+ * WNetAddConnectionA [MPR.@]
+ */
+DWORD WINAPI WNetAddConnectionA( LPCSTR lpRemoteName, LPCSTR lpPassword,
+ LPCSTR lpLocalName )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetAddConnectionW [MPR.@]
+ */
+DWORD WINAPI WNetAddConnectionW( LPCWSTR lpRemoteName, LPCWSTR lpPassword,
+ LPCWSTR lpLocalName )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetAddConnection2A [MPR.@]
+ */
+DWORD WINAPI WNetAddConnection2A( LPNETRESOURCEA lpNetResource,
+ LPCSTR lpPassword, LPCSTR lpUserID,
+ DWORD dwFlags )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetAddConnection2W [MPR.@]
+ */
+DWORD WINAPI WNetAddConnection2W( LPNETRESOURCEW lpNetResource,
+ LPCWSTR lpPassword, LPCWSTR lpUserID,
+ DWORD dwFlags )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetAddConnection3A [MPR.@]
+ */
+DWORD WINAPI WNetAddConnection3A( HWND hwndOwner, LPNETRESOURCEA lpNetResource,
+ LPCSTR lpPassword, LPCSTR lpUserID,
+ DWORD dwFlags )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetAddConnection3W [MPR.@]
+ */
+DWORD WINAPI WNetAddConnection3W( HWND hwndOwner, LPNETRESOURCEW lpNetResource,
+ LPCWSTR lpPassword, LPCWSTR lpUserID,
+ DWORD dwFlags )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}
+
+/*****************************************************************
+ * WNetUseConnectionA [MPR.@]
+ */
+DWORD WINAPI WNetUseConnectionA( HWND hwndOwner, LPNETRESOURCEA lpNetResource,
+ LPCSTR lpPassword, LPCSTR lpUserID, DWORD dwFlags,
+ LPSTR lpAccessName, LPDWORD lpBufferSize,
+ LPDWORD lpResult )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}
+
+/*****************************************************************
+ * WNetUseConnectionW [MPR.@]
+ */
+DWORD WINAPI WNetUseConnectionW( HWND hwndOwner, LPNETRESOURCEW lpNetResource,
+ LPCWSTR lpPassword, LPCWSTR lpUserID, DWORD dwFlags,
+ LPWSTR lpAccessName, LPDWORD lpBufferSize,
+ LPDWORD lpResult )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetCancelConnectionA [MPR.@]
+ */
+DWORD WINAPI WNetCancelConnectionA( LPCSTR lpName, BOOL fForce )
+{
+ return WN_SUCCESS;
+}
+
+/*********************************************************************
+ * WNetCancelConnectionW [MPR.@]
+ */
+DWORD WINAPI WNetCancelConnectionW( LPCWSTR lpName, BOOL fForce )
+{
+ return WN_SUCCESS;
+}
+
+/*********************************************************************
+ * WNetCancelConnection2A [MPR.@]
+ */
+DWORD WINAPI WNetCancelConnection2A( LPCSTR lpName, DWORD dwFlags, BOOL fForce )
+{
+ return WN_SUCCESS;
+}
+
+/*********************************************************************
+ * WNetCancelConnection2W [MPR.@]
+ */
+DWORD WINAPI WNetCancelConnection2W( LPCWSTR lpName, DWORD dwFlags, BOOL fForce )
+{
+ return WN_SUCCESS;
+}
+
+/*****************************************************************
+ * WNetRestoreConnectionA [MPR.@]
+ */
+DWORD WINAPI WNetRestoreConnectionA( HWND hwndOwner, LPSTR lpszDevice )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}
+
+/*****************************************************************
+ * WNetRestoreConnectionW [MPR.@]
+ */
+DWORD WINAPI WNetRestoreConnectionW( HWND hwndOwner, LPWSTR lpszDevice )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}
+
+/**************************************************************************
+ * WNetGetConnectionA [MPR.@]
+ *
+ * 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 )
+{
+ char label[40];
+
+ if (lpLocalName[1] == ':')
+ {
+ switch(GetDriveTypeA(lpLocalName))
+ {
+ case DRIVE_REMOTE:
+ if (!GetVolumeInformationA( lpLocalName, label, sizeof(label),
+ NULL, NULL, NULL, NULL, 0 )) label[0] = 0;
+ if (strlen(label) + 1 > *lpBufferSize)
+ {
+ *lpBufferSize = strlen(label) + 1;
+ return WN_MORE_DATA;
+ }
+ strcpy( lpRemoteName, label );
+ *lpBufferSize = strlen(lpRemoteName) + 1;
+ return WN_SUCCESS;
+ case DRIVE_REMOVABLE:
+ case DRIVE_FIXED:
+ case DRIVE_CDROM:
+ return WN_NOT_CONNECTED;
+ default:
+ return WN_BAD_LOCALNAME;
+ }
+ }
+ return WN_BAD_LOCALNAME;
+}
+
+/**************************************************************************
+ * WNetGetConnectionW [MPR.@]
+ */
+DWORD WINAPI WNetGetConnectionW( LPCWSTR lpLocalName,
+ LPWSTR lpRemoteName, LPDWORD lpBufferSize )
+{
+ CHAR buf[200];
+ DWORD ret, x = sizeof(buf);
+ INT len = WideCharToMultiByte( CP_ACP, 0, lpLocalName, -1, NULL, 0, NULL, NULL );
+ LPSTR lnA = HeapAlloc( GetProcessHeap(), 0, len );
+
+ WideCharToMultiByte( CP_ACP, 0, lpLocalName, -1, lnA, len, NULL, NULL );
+ ret = WNetGetConnectionA( lnA, buf, &x );
+ HeapFree( GetProcessHeap(), 0, lnA );
+ if (ret == WN_SUCCESS)
+ {
+ x = MultiByteToWideChar( CP_ACP, 0, buf, -1, NULL, 0 );
+ if (x > *lpBufferSize)
+ {
+ *lpBufferSize = x;
+ return WN_MORE_DATA;
+ }
+ *lpBufferSize = MultiByteToWideChar( CP_ACP, 0, buf, -1, lpRemoteName, *lpBufferSize );
+ }
+ return ret;
+}
+
+/**************************************************************************
+ * WNetSetConnectionA [MPR.@]
+ */
+DWORD WINAPI WNetSetConnectionA( LPCSTR lpName, DWORD dwProperty,
+ LPVOID pvValue )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}
+
+/**************************************************************************
+ * WNetSetConnectionW [MPR.@]
+ */
+DWORD WINAPI WNetSetConnectionW( LPCWSTR lpName, DWORD dwProperty,
+ LPVOID pvValue )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}
+
+/*****************************************************************
+ * WNetGetUniversalNameA [MPR.@]
+ */
+DWORD WINAPI WNetGetUniversalNameA ( LPCSTR lpLocalPath, DWORD dwInfoLevel,
+ LPVOID lpBuffer, LPDWORD lpBufferSize )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}
+
+/*****************************************************************
+ * WNetGetUniversalNameW [MPR.@]
+ */
+DWORD WINAPI WNetGetUniversalNameW ( LPCWSTR lpLocalPath, DWORD dwInfoLevel,
+ LPVOID lpBuffer, LPDWORD lpBufferSize )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}
+
+
+
+/*
+ * Other Functions
+ */
+
+/**************************************************************************
+ * WNetGetUserA [MPR.@]
+ *
+ * FIXME: we should not return ourselves, but the owner of the drive lpName
+ */
+DWORD WINAPI WNetGetUserA( LPCSTR lpName, LPSTR lpUserID, LPDWORD lpBufferSize )
+{
+ if (GetUserNameA( lpUserID, lpBufferSize )) return WN_SUCCESS;
+ return GetLastError();
+}
+
+/*****************************************************************
+ * WNetGetUserW [MPR.@]
+ */
+DWORD WINAPI WNetGetUserW( LPCWSTR lpName, LPWSTR lpUserID, LPDWORD lpBufferSize )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetConnectionDialog [MPR.@]
+ */
+DWORD WINAPI WNetConnectionDialog( HWND hwnd, DWORD dwType )
+{
+ SetLastError(WN_NO_NETWORK);
+ return ERROR_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetConnectionDialog1A [MPR.@]
+ */
+DWORD WINAPI WNetConnectionDialog1A( LPCONNECTDLGSTRUCTA lpConnDlgStruct )
+{
+ SetLastError(WN_NO_NETWORK);
+ return ERROR_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetConnectionDialog1W [MPR.@]
+ */
+DWORD WINAPI WNetConnectionDialog1W( LPCONNECTDLGSTRUCTW lpConnDlgStruct )
+{
+
+ SetLastError(WN_NO_NETWORK);
+ return ERROR_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetDisconnectDialog [MPR.@]
+ */
+DWORD WINAPI WNetDisconnectDialog( HWND hwnd, DWORD dwType )
+{
+ SetLastError(WN_NO_NETWORK);
+ return ERROR_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetDisconnectDialog1A [MPR.@]
+ */
+DWORD WINAPI WNetDisconnectDialog1A( LPDISCDLGSTRUCTA lpConnDlgStruct )
+{
+ SetLastError(WN_NO_NETWORK);
+ return ERROR_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetDisconnectDialog1W [MPR.@]
+ */
+DWORD WINAPI WNetDisconnectDialog1W( LPDISCDLGSTRUCTW lpConnDlgStruct )
+{
+ SetLastError(WN_NO_NETWORK);
+ return ERROR_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetGetLastErrorA [MPR.@]
+ */
+DWORD WINAPI WNetGetLastErrorA( LPDWORD lpError,
+ LPSTR lpErrorBuf, DWORD nErrorBufSize,
+ LPSTR lpNameBuf, DWORD nNameBufSize )
+{
+ SetLastError(WN_NO_NETWORK);
+ return ERROR_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetGetLastErrorW [MPR.@]
+ */
+DWORD WINAPI WNetGetLastErrorW( LPDWORD lpError,
+ LPWSTR lpErrorBuf, DWORD nErrorBufSize,
+ LPWSTR lpNameBuf, DWORD nNameBufSize )
+{
+ SetLastError(WN_NO_NETWORK);
+ return ERROR_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetGetNetworkInformationA [MPR.@]
+ */
+DWORD WINAPI WNetGetNetworkInformationA( LPCSTR lpProvider,
+ LPNETINFOSTRUCT lpNetInfoStruct )
+{
+ SetLastError(WN_NO_NETWORK);
+ return ERROR_NO_NETWORK;
+}
+
+/*********************************************************************
+ * WNetGetNetworkInformationW [MPR.@]
+ */
+DWORD WINAPI WNetGetNetworkInformationW( LPCWSTR lpProvider,
+ LPNETINFOSTRUCT lpNetInfoStruct )
+{
+ SetLastError(WN_NO_NETWORK);
+ return ERROR_NO_NETWORK;
+}
+
+/*****************************************************************
+ * WNetGetProviderNameA [MPR.@]
+ */
+DWORD WINAPI WNetGetProviderNameA( DWORD dwNetType,
+ LPSTR lpProvider, LPDWORD lpBufferSize )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}
+
+/*****************************************************************
+ * WNetGetProviderNameW [MPR.@]
+ */
+DWORD WINAPI WNetGetProviderNameW( DWORD dwNetType,
+ LPWSTR lpProvider, LPDWORD lpBufferSize )
+{
+ SetLastError(WN_NO_NETWORK);
+ return WN_NO_NETWORK;
+}