Pierre Schweitzer : mpr: Implement WNetAddConnectionW(), WNetAddConnection2W(), WNetAddConnection3W().
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Jan 19 10:50:28 CST 2016
Module: wine
Branch: master
Commit: 092c60e98cec9956127145f7c8a5db88082ce7d2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=092c60e98cec9956127145f7c8a5db88082ce7d2
Author: Pierre Schweitzer <pierre at reactos.org>
Date: Sat Jan 16 09:47:59 2016 +0100
mpr: Implement WNetAddConnectionW(), WNetAddConnection2W(), WNetAddConnection3W().
Signed-off-by: Pierre Schweitzer <pierre at reactos.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mpr/wnet.c | 23 +++++++++--------------
1 file changed, 9 insertions(+), 14 deletions(-)
diff --git a/dlls/mpr/wnet.c b/dlls/mpr/wnet.c
index dd34969..941cada 100644
--- a/dlls/mpr/wnet.c
+++ b/dlls/mpr/wnet.c
@@ -1500,11 +1500,12 @@ DWORD WINAPI WNetAddConnectionA( LPCSTR lpRemoteName, LPCSTR lpPassword,
DWORD WINAPI WNetAddConnectionW( LPCWSTR lpRemoteName, LPCWSTR lpPassword,
LPCWSTR lpLocalName )
{
- FIXME( "(%s, %p, %s): stub\n",
- debugstr_w(lpRemoteName), lpPassword, debugstr_w(lpLocalName) );
+ NETRESOURCEW resourcesW;
- SetLastError(WN_NO_NETWORK);
- return WN_NO_NETWORK;
+ memset(&resourcesW, 0, sizeof(resourcesW));
+ resourcesW.lpRemoteName = (LPWSTR)lpRemoteName;
+ resourcesW.lpLocalName = (LPWSTR)lpLocalName;
+ return WNetUseConnectionW(NULL, &resourcesW, lpPassword, NULL, 0, NULL, 0, NULL);
}
/*********************************************************************
@@ -1528,11 +1529,8 @@ DWORD WINAPI WNetAddConnection2W( LPNETRESOURCEW lpNetResource,
LPCWSTR lpPassword, LPCWSTR lpUserID,
DWORD dwFlags )
{
- FIXME( "(%p, %p, %s, 0x%08X): stub\n",
- lpNetResource, lpPassword, debugstr_w(lpUserID), dwFlags );
-
- SetLastError(WN_NO_NETWORK);
- return WN_NO_NETWORK;
+ return WNetUseConnectionW(NULL, lpNetResource, lpPassword, lpUserID, dwFlags,
+ NULL, 0, NULL);
}
/*********************************************************************
@@ -1556,11 +1554,8 @@ DWORD WINAPI WNetAddConnection3W( HWND hwndOwner, LPNETRESOURCEW lpNetResource,
LPCWSTR lpPassword, LPCWSTR lpUserID,
DWORD dwFlags )
{
- FIXME( "(%p, %p, %p, %s, 0x%08X), stub\n",
- hwndOwner, lpNetResource, lpPassword, debugstr_w(lpUserID), dwFlags );
-
- SetLastError(WN_NO_NETWORK);
- return WN_NO_NETWORK;
+ return WNetUseConnectionW(hwndOwner, lpNetResource, lpPassword, lpUserID,
+ dwFlags, NULL, 0, NULL);
}
/*****************************************************************
More information about the wine-cvs
mailing list