Commit 582732e4 authored by Juergen Schmied's avatar Juergen Schmied Committed by Alexandre Julliard

Corrected wrong parameter counts for WNetCachePassword and

WNetEnumCachedPasswords.
parent c7071c03
...@@ -53,7 +53,7 @@ type win32 ...@@ -53,7 +53,7 @@ type win32
0050 stdcall WNetAddConnection3W(long ptr wstr wstr long) WNetAddConnection3W 0050 stdcall WNetAddConnection3W(long ptr wstr wstr long) WNetAddConnection3W
0051 stdcall WNetAddConnectionA(str str str) WNetAddConnectionA 0051 stdcall WNetAddConnectionA(str str str) WNetAddConnectionA
0052 stdcall WNetAddConnectionW(wstr wstr wstr) WNetAddConnectionW 0052 stdcall WNetAddConnectionW(wstr wstr wstr) WNetAddConnectionW
0053 stdcall WNetCachePassword(str long str long long) WNetCachePassword 0053 stdcall WNetCachePassword(str long str long long long) WNetCachePassword
0054 stdcall WNetCancelConnection2A(str long long) WNetCancelConnection2A 0054 stdcall WNetCancelConnection2A(str long long) WNetCancelConnection2A
0055 stdcall WNetCancelConnection2W(wstr long long) WNetCancelConnection2W 0055 stdcall WNetCancelConnection2W(wstr long long) WNetCancelConnection2W
0056 stdcall WNetCancelConnectionA(str long) WNetCancelConnectionA 0056 stdcall WNetCancelConnectionA(str long) WNetCancelConnectionA
...@@ -65,7 +65,7 @@ type win32 ...@@ -65,7 +65,7 @@ type win32
0062 stdcall WNetDisconnectDialog1A(ptr) WNetDisconnectDialog1A 0062 stdcall WNetDisconnectDialog1A(ptr) WNetDisconnectDialog1A
0063 stdcall WNetDisconnectDialog1W(ptr) WNetDisconnectDialog1W 0063 stdcall WNetDisconnectDialog1W(ptr) WNetDisconnectDialog1W
0064 stdcall WNetDisconnectDialog(long long) WNetDisconnectDialog 0064 stdcall WNetDisconnectDialog(long long) WNetDisconnectDialog
0065 stdcall WNetEnumCachedPasswords(str long long ptr) WNetEnumCachedPasswords 0065 stdcall WNetEnumCachedPasswords(str long long ptr long) WNetEnumCachedPasswords
0066 stdcall WNetEnumResourceA(long ptr ptr ptr) WNetEnumResourceA 0066 stdcall WNetEnumResourceA(long ptr ptr ptr) WNetEnumResourceA
0067 stdcall WNetEnumResourceW(long ptr ptr ptr) WNetEnumResourceW 0067 stdcall WNetEnumResourceW(long ptr ptr ptr) WNetEnumResourceW
0068 stub WNetFormatNetworkNameA 0068 stub WNetFormatNetworkNameA
......
...@@ -8,10 +8,13 @@ ...@@ -8,10 +8,13 @@
DEFAULT_DEBUG_CHANNEL(mpr) DEFAULT_DEBUG_CHANNEL(mpr)
/************************************************************************** /**************************************************************************
* WNetCachePassword [MPR.52] Saves password in cache * WNetCachePassword [MPR.52] Saves password in cache
* *
* NOTES
* only the parameter count is verifyed
*
* ---- everything below this line might be wrong (js) -----
* RETURNS * RETURNS
* Success: WN_SUCCESS * Success: WN_SUCCESS
* Failure: WN_ACCESS_DENIED, WN_BAD_PASSWORD, WN_BADVALUE, WN_NET_ERROR, * Failure: WN_ACCESS_DENIED, WN_BAD_PASSWORD, WN_BADVALUE, WN_NET_ERROR,
...@@ -22,10 +25,14 @@ DWORD WINAPI WNetCachePassword( ...@@ -22,10 +25,14 @@ DWORD WINAPI WNetCachePassword(
WORD cbResource, /* [in] Size of name */ WORD cbResource, /* [in] Size of name */
LPSTR pbPassword, /* [in] Buffer containing password */ LPSTR pbPassword, /* [in] Buffer containing password */
WORD cbPassword, /* [in] Size of password */ WORD cbPassword, /* [in] Size of password */
BYTE nType) /* [in] Type of password to cache */ BYTE nType, /* [in] Type of password to cache */
WORD x)
{ {
FIXME( "(%s, %d, %p, %d, %d): stub\n", FIXME( "(%p(%s), %d, %p(%s), %d, %d, 0x%08x): stub\n",
debugstr_a(pbResource), cbResource, pbPassword, cbPassword, nType ); pbResource, debugstr_a(pbResource), cbResource,
pbPassword, debugstr_a(pbPassword), cbPassword,
nType, x );
return WN_SUCCESS; return WN_SUCCESS;
} }
...@@ -36,8 +43,8 @@ DWORD WINAPI WNetCachePassword( ...@@ -36,8 +43,8 @@ DWORD WINAPI WNetCachePassword(
UINT WINAPI WNetRemoveCachedPassword( LPSTR pbResource, WORD cbResource, UINT WINAPI WNetRemoveCachedPassword( LPSTR pbResource, WORD cbResource,
BYTE nType ) BYTE nType )
{ {
FIXME( "(%s, %d, %d): stub\n", FIXME( "(%p(%s), %d, %d): stub\n",
debugstr_a(pbResource), cbResource, nType ); pbResource, debugstr_a(pbResource), cbResource, nType );
return WN_SUCCESS; return WN_SUCCESS;
} }
...@@ -45,6 +52,15 @@ UINT WINAPI WNetRemoveCachedPassword( LPSTR pbResource, WORD cbResource, ...@@ -45,6 +52,15 @@ UINT WINAPI WNetRemoveCachedPassword( LPSTR pbResource, WORD cbResource,
/***************************************************************** /*****************************************************************
* WNetGetCachedPassword [MPR.69] Retrieves password from cache * WNetGetCachedPassword [MPR.69] 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 * RETURNS
* Success: WN_SUCCESS * Success: WN_SUCCESS
* Failure: WN_ACCESS_DENIED, WN_BAD_PASSWORD, WN_BAD_VALUE, * Failure: WN_ACCESS_DENIED, WN_BAD_PASSWORD, WN_BAD_VALUE,
...@@ -57,8 +73,9 @@ DWORD WINAPI WNetGetCachedPassword( ...@@ -57,8 +73,9 @@ DWORD WINAPI WNetGetCachedPassword(
LPWORD pcbPassword, /* [out] Receives size of password */ LPWORD pcbPassword, /* [out] Receives size of password */
BYTE nType) /* [in] Type of password to retrieve */ BYTE nType) /* [in] Type of password to retrieve */
{ {
FIXME( "(%s, %d, %p, %p, %d): stub\n", FIXME( "(%p(%s), %d, %p, %p, %d): stub\n",
debugstr_a(pbResource), cbResource, pbPassword, pcbPassword, nType ); pbResource, debugstr_a(pbResource), cbResource,
pbPassword, pcbPassword, nType );
SetLastError(WN_NO_NETWORK); SetLastError(WN_NO_NETWORK);
return WN_NO_NETWORK; return WN_NO_NETWORK;
...@@ -66,12 +83,26 @@ DWORD WINAPI WNetGetCachedPassword( ...@@ -66,12 +83,26 @@ DWORD WINAPI WNetGetCachedPassword(
/******************************************************************* /*******************************************************************
* WNetEnumCachedPasswords [MPR.61] * WNetEnumCachedPasswords [MPR.61]
*
* 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, UINT WINAPI WNetEnumCachedPasswords( LPSTR pbPrefix, WORD cbPrefix,
BYTE nType, FARPROC enumPasswordProc ) BYTE nType, ENUMPASSWORDPROC enumPasswordProc, DWORD x)
{ {
FIXME( "(%p, %d, %d, %p): stub\n", FIXME( "(%p(%s), %d, %d, %p, 0x%08lx): stub\n",
pbPrefix, cbPrefix, nType, enumPasswordProc ); pbPrefix, debugstr_a(pbPrefix), cbPrefix,
nType, enumPasswordProc, x );
SetLastError(WN_NO_NETWORK); SetLastError(WN_NO_NETWORK);
return WN_NO_NETWORK; return WN_NO_NETWORK;
......
...@@ -353,5 +353,22 @@ DWORD WINAPI MultinetGetErrorTextA(DWORD,DWORD,DWORD); ...@@ -353,5 +353,22 @@ DWORD WINAPI MultinetGetErrorTextA(DWORD,DWORD,DWORD);
DWORD WINAPI MultinetGetErrorTextW(DWORD,DWORD,DWORD); DWORD WINAPI MultinetGetErrorTextW(DWORD,DWORD,DWORD);
#define MultinetGetErrorText WINELIB_NAME_AW(MultinetGetErrorText) #define MultinetGetErrorText WINELIB_NAME_AW(MultinetGetErrorText)
/*
* Password cache
*/
/* WNetEnumCachedPasswords */
typedef struct tagPASSWORD_CACHE_ENTRY
{
WORD cbEntry;
WORD cbResource;
WORD cbPassword;
BYTE iEntry;
BYTE nType;
BYTE abResource[1];
} PASSWORD_CACHE_ENTRY;
typedef BOOL (CALLBACK * ENUMPASSWORDPROC)(PASSWORD_CACHE_ENTRY *, DWORD);
UINT WINAPI WNetEnumCachedPasswords( LPSTR, WORD, BYTE, ENUMPASSWORDPROC, DWORD);
#endif /* _WINNETWK_H_ */ #endif /* _WINNETWK_H_ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment