1999-08-07 16:32:33 +02:00
|
|
|
/*
|
|
|
|
* MPR Password Cache functions
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "winbase.h"
|
|
|
|
#include "winnetwk.h"
|
|
|
|
#include "debugtools.h"
|
|
|
|
|
2000-11-28 00:54:25 +01:00
|
|
|
DEFAULT_DEBUG_CHANNEL(mpr);
|
1999-08-07 16:32:33 +02:00
|
|
|
|
|
|
|
/**************************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetCachePassword [MPR.@] Saves password in cache
|
1999-08-07 16:32:33 +02:00
|
|
|
*
|
1999-11-23 23:27:03 +01:00
|
|
|
* NOTES
|
|
|
|
* only the parameter count is verifyed
|
|
|
|
*
|
|
|
|
* ---- everything below this line might be wrong (js) -----
|
1999-08-07 16:32:33 +02:00
|
|
|
* RETURNS
|
|
|
|
* Success: WN_SUCCESS
|
|
|
|
* Failure: WN_ACCESS_DENIED, WN_BAD_PASSWORD, WN_BADVALUE, WN_NET_ERROR,
|
|
|
|
* WN_NOT_SUPPORTED, WN_OUT_OF_MEMORY
|
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetCachePassword(
|
|
|
|
LPSTR pbResource, /* [in] Name of workgroup, computer, or resource */
|
|
|
|
WORD cbResource, /* [in] Size of name */
|
|
|
|
LPSTR pbPassword, /* [in] Buffer containing password */
|
|
|
|
WORD cbPassword, /* [in] Size of password */
|
1999-11-23 23:27:03 +01:00
|
|
|
BYTE nType, /* [in] Type of password to cache */
|
|
|
|
WORD x)
|
|
|
|
|
1999-08-07 16:32:33 +02:00
|
|
|
{
|
1999-11-23 23:27:03 +01:00
|
|
|
FIXME( "(%p(%s), %d, %p(%s), %d, %d, 0x%08x): stub\n",
|
|
|
|
pbResource, debugstr_a(pbResource), cbResource,
|
|
|
|
pbPassword, debugstr_a(pbPassword), cbPassword,
|
|
|
|
nType, x );
|
1999-08-07 16:32:33 +02:00
|
|
|
|
|
|
|
return WN_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetRemoveCachedPassword [MPR.@]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
UINT WINAPI WNetRemoveCachedPassword( LPSTR pbResource, WORD cbResource,
|
|
|
|
BYTE nType )
|
|
|
|
{
|
1999-11-23 23:27:03 +01:00
|
|
|
FIXME( "(%p(%s), %d, %d): stub\n",
|
|
|
|
pbResource, debugstr_a(pbResource), cbResource, nType );
|
1999-08-07 16:32:33 +02:00
|
|
|
|
|
|
|
return WN_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetGetCachedPassword [MPR.@] Retrieves password from cache
|
1999-08-07 16:32:33 +02:00
|
|
|
*
|
1999-11-23 23:27:03 +01:00
|
|
|
* 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) -----
|
1999-08-07 16:32:33 +02:00
|
|
|
* RETURNS
|
|
|
|
* Success: WN_SUCCESS
|
|
|
|
* Failure: WN_ACCESS_DENIED, WN_BAD_PASSWORD, WN_BAD_VALUE,
|
|
|
|
* WN_NET_ERROR, WN_NOT_SUPPORTED, WN_OUT_OF_MEMORY
|
|
|
|
*/
|
|
|
|
DWORD WINAPI WNetGetCachedPassword(
|
|
|
|
LPSTR pbResource, /* [in] Name of workgroup, computer, or resource */
|
|
|
|
WORD cbResource, /* [in] Size of name */
|
|
|
|
LPSTR pbPassword, /* [out] Buffer to receive password */
|
|
|
|
LPWORD pcbPassword, /* [out] Receives size of password */
|
|
|
|
BYTE nType) /* [in] Type of password to retrieve */
|
|
|
|
{
|
1999-11-23 23:27:03 +01:00
|
|
|
FIXME( "(%p(%s), %d, %p, %p, %d): stub\n",
|
|
|
|
pbResource, debugstr_a(pbResource), cbResource,
|
|
|
|
pbPassword, pcbPassword, nType );
|
1999-08-07 16:32:33 +02:00
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return WN_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*******************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WNetEnumCachedPasswords [MPR.@]
|
1999-11-23 23:27:03 +01:00
|
|
|
*
|
|
|
|
* 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) -----
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
1999-11-23 23:27:03 +01:00
|
|
|
|
1999-08-07 16:32:33 +02:00
|
|
|
UINT WINAPI WNetEnumCachedPasswords( LPSTR pbPrefix, WORD cbPrefix,
|
1999-11-23 23:27:03 +01:00
|
|
|
BYTE nType, ENUMPASSWORDPROC enumPasswordProc, DWORD x)
|
1999-08-07 16:32:33 +02:00
|
|
|
{
|
1999-11-23 23:27:03 +01:00
|
|
|
FIXME( "(%p(%s), %d, %d, %p, 0x%08lx): stub\n",
|
|
|
|
pbPrefix, debugstr_a(pbPrefix), cbPrefix,
|
|
|
|
nType, enumPasswordProc, x );
|
1999-08-07 16:32:33 +02:00
|
|
|
|
|
|
|
SetLastError(WN_NO_NETWORK);
|
|
|
|
return WN_NO_NETWORK;
|
|
|
|
}
|
|
|
|
|
|
|
|
|