mirror of
https://github.com/reactos/reactos.git
synced 2025-04-05 21:21:33 +00:00
[MPR]
* Sync with Wine 1.7.1. CORE-7469 svn path=/trunk/; revision=60276
This commit is contained in:
parent
07fda74e85
commit
7692695872
7 changed files with 22 additions and 23 deletions
|
@ -13,11 +13,10 @@ list(APPEND SOURCE
|
|||
nps.c
|
||||
pwcache.c
|
||||
wnet.c
|
||||
mpr.rc
|
||||
${CMAKE_CURRENT_BINARY_DIR}/mpr_stubs.c
|
||||
${CMAKE_CURRENT_BINARY_DIR}/mpr.def)
|
||||
|
||||
add_library(mpr SHARED ${SOURCE})
|
||||
add_library(mpr SHARED ${SOURCE} mpr.rc)
|
||||
set_module_type(mpr win32dll)
|
||||
target_link_libraries(mpr wine)
|
||||
add_importlibs(mpr advapi32 user32 msvcrt kernel32 ntdll)
|
||||
|
|
|
@ -23,8 +23,6 @@
|
|||
24 stdcall @(ptr) MPR_Free
|
||||
25 stdcall @(ptr long) _MPR_25
|
||||
|
||||
@ stdcall -private DllCanUnloadNow()
|
||||
@ stub -private DllGetClassObject
|
||||
@ stdcall MultinetGetConnectionPerformanceA(ptr ptr)
|
||||
@ stdcall MultinetGetConnectionPerformanceW(ptr ptr)
|
||||
@ stdcall MultinetGetErrorTextA(long ptr long)
|
||||
|
|
|
@ -75,14 +75,6 @@ BOOL WINAPI _MPR_25( LPBYTE lpMem, INT len )
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
/*****************************************************************
|
||||
* DllCanUnloadNow [MPR.@]
|
||||
*/
|
||||
HRESULT WINAPI DllCanUnloadNow(void)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/*****************************************************************
|
||||
* DllMain [MPR.init]
|
||||
*/
|
||||
|
@ -95,6 +87,7 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
|||
break;
|
||||
|
||||
case DLL_PROCESS_DETACH:
|
||||
if (lpvReserved) break;
|
||||
wnetFree();
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -262,7 +262,6 @@ UINT WINAPI WNetEnumCachedPasswords(
|
|||
|
||||
sprintf(prefix, "X-%02X-", nType );
|
||||
|
||||
i = 0;
|
||||
for( i=0; ; i++ )
|
||||
{
|
||||
val_sz = sizeof val;
|
||||
|
@ -301,8 +300,8 @@ UINT WINAPI WNetEnumCachedPasswords(
|
|||
continue;
|
||||
|
||||
/* read the value data */
|
||||
size = sizeof *entry - sizeof entry->abResource[0] + val_sz + data_sz;
|
||||
entry = HeapAlloc( GetProcessHeap(), 0, sizeof *entry + val_sz + data_sz );
|
||||
size = offsetof( PASSWORD_CACHE_ENTRY, abResource[val_sz + data_sz] );
|
||||
entry = HeapAlloc( GetProcessHeap(), 0, size );
|
||||
memcpy( entry->abResource, val, val_sz );
|
||||
entry->cbEntry = size;
|
||||
entry->cbResource = val_sz;
|
||||
|
|
|
@ -640,7 +640,7 @@ DWORD WINAPI WNetOpenEnumA( DWORD dwScope, DWORD dwType, DWORD dwUsage,
|
|||
ret = WN_BAD_POINTER;
|
||||
else if (!providerTable || providerTable->numProviders == 0)
|
||||
{
|
||||
lphEnum = NULL;
|
||||
*lphEnum = NULL;
|
||||
ret = WN_NO_NETWORK;
|
||||
}
|
||||
else
|
||||
|
@ -732,7 +732,7 @@ DWORD WINAPI WNetOpenEnumW( DWORD dwScope, DWORD dwType, DWORD dwUsage,
|
|||
ret = WN_BAD_POINTER;
|
||||
else if (!providerTable || providerTable->numProviders == 0)
|
||||
{
|
||||
lphEnum = NULL;
|
||||
*lphEnum = NULL;
|
||||
ret = WN_NO_NETWORK;
|
||||
}
|
||||
else
|
||||
|
@ -1175,7 +1175,7 @@ static DWORD _enumerateContextW(PWNetEnumerator enumerator, LPDWORD lpcCount,
|
|||
if (ret == WN_SUCCESS)
|
||||
{
|
||||
/* reflect the fact that we already enumerated "Entire Network" */
|
||||
lpcCount++;
|
||||
(*lpcCount)++;
|
||||
*lpBufferSize = bufferSize + bytesNeeded;
|
||||
}
|
||||
else
|
||||
|
@ -1894,6 +1894,12 @@ DWORD WINAPI WNetGetUniversalNameA ( LPCSTR lpLocalPath, DWORD dwInfoLevel,
|
|||
{
|
||||
LPUNIVERSAL_NAME_INFOA info = lpBuffer;
|
||||
|
||||
if (GetDriveTypeA(lpLocalPath) != DRIVE_REMOTE)
|
||||
{
|
||||
err = ERROR_NOT_CONNECTED;
|
||||
break;
|
||||
}
|
||||
|
||||
size = sizeof(*info) + lstrlenA(lpLocalPath) + 1;
|
||||
if (*lpBufferSize < size)
|
||||
{
|
||||
|
@ -1902,7 +1908,6 @@ DWORD WINAPI WNetGetUniversalNameA ( LPCSTR lpLocalPath, DWORD dwInfoLevel,
|
|||
}
|
||||
info->lpUniversalName = (char *)info + sizeof(*info);
|
||||
lstrcpyA(info->lpUniversalName, lpLocalPath);
|
||||
*lpBufferSize = size;
|
||||
err = WN_NO_ERROR;
|
||||
break;
|
||||
}
|
||||
|
@ -1936,6 +1941,12 @@ DWORD WINAPI WNetGetUniversalNameW ( LPCWSTR lpLocalPath, DWORD dwInfoLevel,
|
|||
{
|
||||
LPUNIVERSAL_NAME_INFOW info = lpBuffer;
|
||||
|
||||
if (GetDriveTypeW(lpLocalPath) != DRIVE_REMOTE)
|
||||
{
|
||||
err = ERROR_NOT_CONNECTED;
|
||||
break;
|
||||
}
|
||||
|
||||
size = sizeof(*info) + (lstrlenW(lpLocalPath) + 1) * sizeof(WCHAR);
|
||||
if (*lpBufferSize < size)
|
||||
{
|
||||
|
@ -1944,7 +1955,6 @@ DWORD WINAPI WNetGetUniversalNameW ( LPCWSTR lpLocalPath, DWORD dwInfoLevel,
|
|||
}
|
||||
info->lpUniversalName = (LPWSTR)((char *)info + sizeof(*info));
|
||||
lstrcpyW(info->lpUniversalName, lpLocalPath);
|
||||
*lpBufferSize = size;
|
||||
err = WN_NO_ERROR;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#ifndef __WNET_PRIV_H__
|
||||
#define __WNET_PRIV_H__
|
||||
|
||||
void wnetInit(HINSTANCE hInstDll);
|
||||
void wnetFree(void);
|
||||
void wnetInit(HINSTANCE hInstDll) DECLSPEC_HIDDEN;
|
||||
void wnetFree(void) DECLSPEC_HIDDEN;
|
||||
|
||||
#endif /* ndef __WNET_PRIV_H__ */
|
||||
|
|
|
@ -103,7 +103,7 @@ reactos/dll/win32/mciqtz32 # Synced to Wine-1.7.1
|
|||
reactos/dll/win32/mciseq # Synced to Wine-1.7.1
|
||||
reactos/dll/win32/mciwave # Synced to Wine-1.5.19
|
||||
reactos/dll/win32/mlang # Synced to Wine-1.7.1
|
||||
reactos/dll/win32/mpr # Autosync
|
||||
reactos/dll/win32/mpr # Synced to Wine-1.7.1
|
||||
reactos/dll/win32/mprapi # Synced to Wine-1.5.19
|
||||
reactos/dll/win32/msacm32 # Autosync
|
||||
reactos/dll/win32/msadp32.acm # Synced to Wine-1.5.19
|
||||
|
|
Loading…
Reference in a new issue