Added some new Rtl* tests.
[wine] / dlls / mpr / pwcache.c
1 /*
2  * MPR Password Cache functions
3  *
4  * Copyright 1999 Ulrich Weigand
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #include "winbase.h"
22 #include "winnetwk.h"
23 #include "wine/debug.h"
24
25 WINE_DEFAULT_DEBUG_CHANNEL(mpr);
26
27 /**************************************************************************
28  * WNetCachePassword [MPR.@]  Saves password in cache
29  *
30  * NOTES
31  *      only the parameter count is verifyed
32  *
33  *      ---- everything below this line might be wrong (js) -----
34  * RETURNS
35  *    Success: WN_SUCCESS
36  *    Failure: WN_ACCESS_DENIED, WN_BAD_PASSWORD, WN_BADVALUE, WN_NET_ERROR,
37  *             WN_NOT_SUPPORTED, WN_OUT_OF_MEMORY
38  */
39 DWORD WINAPI WNetCachePassword(
40     LPSTR pbResource, /* [in] Name of workgroup, computer, or resource */
41     WORD cbResource,  /* [in] Size of name */
42     LPSTR pbPassword, /* [in] Buffer containing password */
43     WORD cbPassword,  /* [in] Size of password */
44     BYTE nType,       /* [in] Type of password to cache */
45     WORD x)
46
47 {
48     FIXME( "(%p(%s), %d, %p(%s), %d, %d, 0x%08x): stub\n",
49            pbResource, debugstr_a(pbResource), cbResource,
50            pbPassword, debugstr_a(pbPassword), cbPassword,
51            nType, x );
52
53     return WN_NOT_SUPPORTED;
54 }
55
56 /*****************************************************************
57  *  WNetRemoveCachedPassword [MPR.@]
58  */
59 UINT WINAPI WNetRemoveCachedPassword( LPSTR pbResource, WORD cbResource,
60                                       BYTE nType )
61 {
62     FIXME( "(%p(%s), %d, %d): stub\n",
63            pbResource, debugstr_a(pbResource), cbResource, nType );
64
65     return WN_NOT_SUPPORTED;
66 }
67
68 /*****************************************************************
69  * WNetGetCachedPassword [MPR.@]  Retrieves password from cache
70  *
71  * NOTES
72  *  the stub seems to be wrong:
73  *      arg1:   ptr     0x40xxxxxx -> (no string)
74  *      arg2:   len     36
75  *      arg3:   ptr     0x40xxxxxx -> (no string)
76  *      arg4:   ptr     0x40xxxxxx -> 0xc8
77  *      arg5:   type?   4
78  *
79  *      ---- everything below this line might be wrong (js) -----
80  * RETURNS
81  *    Success: WN_SUCCESS
82  *    Failure: WN_ACCESS_DENIED, WN_BAD_PASSWORD, WN_BAD_VALUE,
83  *             WN_NET_ERROR, WN_NOT_SUPPORTED, WN_OUT_OF_MEMORY
84  */
85 DWORD WINAPI WNetGetCachedPassword(
86     LPSTR pbResource,   /* [in]  Name of workgroup, computer, or resource */
87     WORD cbResource,    /* [in]  Size of name */
88     LPSTR pbPassword,   /* [out] Buffer to receive password */
89     LPWORD pcbPassword, /* [out] Receives size of password */
90     BYTE nType)         /* [in]  Type of password to retrieve */
91 {
92     FIXME( "(%p(%s), %d, %p, %p, %d): stub\n",
93            pbResource, debugstr_a(pbResource), cbResource,
94            pbPassword, pcbPassword, nType );
95
96     return WN_NOT_SUPPORTED;
97 }
98
99 /*******************************************************************
100  * WNetEnumCachedPasswords [MPR.@]
101  *
102  * NOTES
103  *      the parameter count is verifyed
104  *
105  *  observed values:
106  *      arg1    ptr     0x40xxxxxx -> (no string)
107  *      arg2    int     32
108  *      arg3    type?   4
109  *      arg4    enumPasswordProc (verifyed)
110  *      arg5    ptr     0x40xxxxxx -> 0x0
111  *
112  *      ---- everything below this line might be wrong (js) -----
113  */
114
115 UINT WINAPI WNetEnumCachedPasswords( LPSTR pbPrefix, WORD cbPrefix,
116                                      BYTE nType, ENUMPASSWORDPROC enumPasswordProc, DWORD x)
117 {
118     FIXME( "(%p(%s), %d, %d, %p, 0x%08lx): stub\n",
119            pbPrefix, debugstr_a(pbPrefix), cbPrefix,
120            nType, enumPasswordProc, x );
121
122     return WN_NOT_SUPPORTED;
123 }