Pierre Schweitzer : mpr: Implement WNetAddConnectionA(), WNetAddConnection2A(), WNetAddConnection3A().
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Jan 19 10:50:28 CST 2016
Module: wine
Branch: master
Commit: 39ec97ea9dcba270bbea31a7eaa7b842bf1beb1f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=39ec97ea9dcba270bbea31a7eaa7b842bf1beb1f
Author: Pierre Schweitzer <pierre at reactos.org>
Date: Sat Jan 16 09:51:14 2016 +0100
mpr: Implement WNetAddConnectionA(), WNetAddConnection2A(), WNetAddConnection3A().
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 941cada..2b53f2a 100644
--- a/dlls/mpr/wnet.c
+++ b/dlls/mpr/wnet.c
@@ -1487,11 +1487,12 @@ DWORD WINAPI WNetGetResourceParentW( LPNETRESOURCEW lpNetResource,
DWORD WINAPI WNetAddConnectionA( LPCSTR lpRemoteName, LPCSTR lpPassword,
LPCSTR lpLocalName )
{
- FIXME( "(%s, %p, %s): stub\n",
- debugstr_a(lpRemoteName), lpPassword, debugstr_a(lpLocalName) );
+ NETRESOURCEA resourcesA;
- SetLastError(WN_NO_NETWORK);
- return WN_NO_NETWORK;
+ memset(&resourcesA, 0, sizeof(resourcesA));
+ resourcesA.lpRemoteName = (LPSTR)lpRemoteName;
+ resourcesA.lpLocalName = (LPSTR)lpLocalName;
+ return WNetUseConnectionA(NULL, &resourcesA, lpPassword, NULL, 0, NULL, 0, NULL);
}
/*********************************************************************
@@ -1515,11 +1516,8 @@ DWORD WINAPI WNetAddConnection2A( LPNETRESOURCEA lpNetResource,
LPCSTR lpPassword, LPCSTR lpUserID,
DWORD dwFlags )
{
- FIXME( "(%p, %p, %s, 0x%08X): stub\n",
- lpNetResource, lpPassword, debugstr_a(lpUserID), dwFlags );
-
- SetLastError(WN_NO_NETWORK);
- return WN_NO_NETWORK;
+ return WNetUseConnectionA(NULL, lpNetResource, lpPassword, lpUserID, dwFlags,
+ NULL, 0, NULL);
}
/*********************************************************************
@@ -1540,11 +1538,8 @@ DWORD WINAPI WNetAddConnection3A( HWND hwndOwner, LPNETRESOURCEA lpNetResource,
LPCSTR lpPassword, LPCSTR lpUserID,
DWORD dwFlags )
{
- FIXME( "(%p, %p, %p, %s, 0x%08X), stub\n",
- hwndOwner, lpNetResource, lpPassword, debugstr_a(lpUserID), dwFlags );
-
- SetLastError(WN_NO_NETWORK);
- return WN_NO_NETWORK;
+ return WNetUseConnectionA(hwndOwner, lpNetResource, lpPassword, lpUserID,
+ dwFlags, NULL, 0, NULL);
}
/*********************************************************************
More information about the wine-cvs
mailing list