Author: pschweitzer Date: Tue Jan 19 18:39:18 2016 New Revision: 70619
URL: http://svn.reactos.org/svn/reactos?rev=70619&view=rev Log: [MPR] Import Wine commits: - 39ec97ea9dcba270bbea31a7eaa7b842bf1beb1f, Implement WNetAddConnectionA(), WNetAddConnection2A(), WNetAddConnection3A(). - 092c60e98cec9956127145f7c8a5db88082ce7d2, Implement WNetAddConnectionW(), WNetAddConnection2W(), WNetAddConnection3W().
CORE-10032 ROSAPPS-303
Modified: trunk/reactos/dll/win32/mpr/wnet.c
Modified: trunk/reactos/dll/win32/mpr/wnet.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mpr/wnet.c?rev=70... ============================================================================== --- trunk/reactos/dll/win32/mpr/wnet.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mpr/wnet.c [iso-8859-1] Tue Jan 19 18:39:18 2016 @@ -1477,11 +1477,12 @@ 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; + NETRESOURCEA resourcesA; + + memset(&resourcesA, 0, sizeof(resourcesA)); + resourcesA.lpRemoteName = (LPSTR)lpRemoteName; + resourcesA.lpLocalName = (LPSTR)lpLocalName; + return WNetUseConnectionA(NULL, &resourcesA, lpPassword, NULL, 0, NULL, 0, NULL); }
/********************************************************************* @@ -1490,11 +1491,12 @@ 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; + NETRESOURCEW resourcesW; + + memset(&resourcesW, 0, sizeof(resourcesW)); + resourcesW.lpRemoteName = (LPWSTR)lpRemoteName; + resourcesW.lpLocalName = (LPWSTR)lpLocalName; + return WNetUseConnectionW(NULL, &resourcesW, lpPassword, NULL, 0, NULL, 0, NULL); }
/********************************************************************* @@ -1504,11 +1506,8 @@ 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); }
/********************************************************************* @@ -1518,11 +1517,8 @@ 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); }
/********************************************************************* @@ -1532,11 +1528,8 @@ 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); }
/********************************************************************* @@ -1546,11 +1539,8 @@ 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); }
/*****************************************************************