ReactOS  0.4.14-dev-552-g2fad488
profile.c
Go to the documentation of this file.
1 /*
2  * Wireless LAN API (wlanapi.dll)
3  *
4  * Copyright 2009 Christoph von Wittich (Christoph@ApiViewer.de)
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 
22 /* INCLUDES ****************************************************************/
23 #define WIN32_NO_STATUS
24 #define _INC_WINDOWS
25 #define COM_NO_WINDOWS_H
26 #include <stdarg.h>
27 #include <windef.h>
28 #include <winbase.h>
29 #include <wlansvc_c.h>
30 
31 #include <wine/debug.h>
32 
34 
35 DWORD
36 WINAPI
37 WlanDeleteProfile(IN HANDLE hClientHandle,
38  IN const GUID *pInterfaceGuid,
39  IN LPCWSTR strProfileName,
40  PVOID pReserved)
41 {
42  DWORD dwResult = ERROR_SUCCESS;
43 
44  if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL) || (strProfileName == NULL))
46 
48  {
49  dwResult = _RpcDeleteProfile(hClientHandle, pInterfaceGuid, strProfileName);
50  }
52  {
53  dwResult = RpcExceptionCode();
54  }
56 
57  return dwResult;
58 }
59 
60 DWORD
61 WINAPI
62 WlanRenameProfile(IN HANDLE hClientHandle,
63  IN const GUID *pInterfaceGuid,
64  IN LPCWSTR strOldProfileName,
65  IN LPCWSTR strNewProfileName,
66  PVOID pReserved)
67 {
68  DWORD dwResult = ERROR_SUCCESS;
69 
70  if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL) || (strOldProfileName == NULL) || (strNewProfileName == NULL))
72 
74  {
75  dwResult = _RpcRenameProfile(hClientHandle, pInterfaceGuid, strOldProfileName, strNewProfileName);
76  }
78  {
79  dwResult = RpcExceptionCode();
80  }
82 
83  return dwResult;
84 }
85 
86 DWORD
87 WINAPI
88 WlanGetProfile(IN HANDLE hClientHandle,
89  IN const GUID *pInterfaceGuid,
90  IN LPCWSTR strProfileName,
91  PVOID pReserved,
92  OUT LPWSTR *pstrProfileXml,
93  DWORD *pdwFlags,
94  PDWORD pdwGrantedAccess)
95 {
96  if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL) || (pstrProfileXml == NULL))
98 
100  return ERROR_SUCCESS;
101 }
102 
103 DWORD
104 WINAPI
105 WlanSetProfile(IN HANDLE hClientHandle,
106  IN const GUID *pInterfaceGuid,
107  IN DWORD dwFlags,
108  IN LPCWSTR strProfileXml,
109  LPCWSTR strAllUserProfileSecurity,
110  IN BOOL bOverwrite,
111  PVOID pReserved,
112  OUT DWORD *pdwReasonCode)
113 {
114  if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL) || (strProfileXml == NULL) || (pdwReasonCode == NULL))
116 
118  return ERROR_SUCCESS;
119 }
120 
121 DWORD
122 WINAPI
124  IN const GUID *pInterfaceGuid,
125  IN LPCWSTR strProfileName,
126  PVOID pReserved,
127  OUT DWORD *pdwDataSize,
128  OUT PBYTE *ppData)
129 {
130  if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL) || (strProfileName == NULL))
132 
134  return ERROR_SUCCESS;
135 }
136 
137 DWORD
138 WINAPI
140  IN const GUID *pInterfaceGuid,
141  IN LPCWSTR strProfileName,
142  IN DWORD dwDataSize,
143  IN const PBYTE pData,
144  PVOID pReserved)
145 {
146  if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL) || (strProfileName == NULL))
148 
149  if ((dwDataSize != 0) && (pData == NULL))
150  return ERROR_INVALID_PARAMETER;
151 
153  return ERROR_SUCCESS;
154 }
155 
156 DWORD
157 WINAPI
159  IN const GUID *pInterfaceGuid,
160  PVOID pReserved,
161  OUT PWLAN_PROFILE_INFO_LIST *ppProfileList)
162 {
163  if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL) || (ppProfileList == NULL))
165 
167  return ERROR_SUCCESS;
168 }
169 
170 DWORD
171 WINAPI
173  IN const GUID *pInterfaceGuid,
174  DWORD dwItems,
175  IN LPCWSTR *strProfileNames,
176  PVOID pReserved)
177 {
178  if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL) || (strProfileNames == NULL) || (dwItems == 0))
180 
182  return ERROR_SUCCESS;
183 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
#define IN
Definition: typedefs.h:38
#define RpcEndExcept
Definition: rpc.h:128
DWORD WINAPI WlanGetProfileCustomUserData(IN HANDLE hClientHandle, IN const GUID *pInterfaceGuid, IN LPCWSTR strProfileName, PVOID pReserved, OUT DWORD *pdwDataSize, OUT PBYTE *ppData)
Definition: profile.c:123
#define ERROR_SUCCESS
Definition: deptool.c:10
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
DWORD WINAPI WlanSetProfileList(IN HANDLE hClientHandle, IN const GUID *pInterfaceGuid, DWORD dwItems, IN LPCWSTR *strProfileNames, PVOID pReserved)
Definition: profile.c:172
unsigned int BOOL
Definition: ntddk_ex.h:94
WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg)
#define RpcTryExcept
Definition: rpc.h:126
DWORD WINAPI WlanGetProfile(IN HANDLE hClientHandle, IN const GUID *pInterfaceGuid, IN LPCWSTR strProfileName, PVOID pReserved, OUT LPWSTR *pstrProfileXml, DWORD *pdwFlags, PDWORD pdwGrantedAccess)
Definition: profile.c:88
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
DWORD WINAPI WlanGetProfileList(IN HANDLE hClientHandle, IN const GUID *pInterfaceGuid, PVOID pReserved, OUT PWLAN_PROFILE_INFO_LIST *ppProfileList)
Definition: profile.c:158
#define RpcExceptionCode()
Definition: rpc.h:132
#define WINAPI
Definition: msvc.h:8
unsigned long DWORD
Definition: ntddk_ex.h:95
PSDBQUERYRESULT_VISTA PVOID * ppData
Definition: env.c:54
DWORD _RpcRenameProfile(WLANSVC_RPC_HANDLE hClientHandle, const GUID *pInterfaceGuid, const wchar_t *strOldProfileName, const wchar_t *strNewProfileName)
Definition: rpcserver.c:391
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
DWORD WINAPI WlanRenameProfile(IN HANDLE hClientHandle, IN const GUID *pInterfaceGuid, IN LPCWSTR strOldProfileName, IN LPCWSTR strNewProfileName, PVOID pReserved)
Definition: profile.c:62
DWORD WINAPI WlanSetProfileCustomUserData(IN HANDLE hClientHandle, IN const GUID *pInterfaceGuid, IN LPCWSTR strProfileName, IN DWORD dwDataSize, IN const PBYTE pData, PVOID pReserved)
Definition: profile.c:139
DWORD * PDWORD
Definition: pedump.c:68
#define OUT
Definition: typedefs.h:39
#define UNIMPLEMENTED
Definition: debug.h:114
DWORD WINAPI WlanDeleteProfile(IN HANDLE hClientHandle, IN const GUID *pInterfaceGuid, IN LPCWSTR strProfileName, PVOID pReserved)
Definition: profile.c:37
WCHAR * LPWSTR
Definition: xmlstorage.h:184
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827
BYTE * PBYTE
Definition: pedump.c:66
DWORD WINAPI WlanSetProfile(IN HANDLE hClientHandle, IN const GUID *pInterfaceGuid, IN DWORD dwFlags, IN LPCWSTR strProfileXml, LPCWSTR strAllUserProfileSecurity, IN BOOL bOverwrite, PVOID pReserved, OUT DWORD *pdwReasonCode)
Definition: profile.c:105
#define RpcExcept(expr)
Definition: rpc.h:127
DWORD _RpcDeleteProfile(WLANSVC_RPC_HANDLE hClientHandle, const GUID *pInterfaceGuid, const wchar_t *strProfileName)
Definition: rpcserver.c:382