ReactOS  0.4.11-dev-946-g431643b
rpcserver.c File Reference
#include "precomp.h"
#include <debug.h>
Include dependency graph for rpcserver.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

DWORD WINAPI RpcThreadRoutine (LPVOID lpParameter)
 
PWLANSVCHANDLE WlanSvcGetHandleEntry (LPWLANSVC_RPC_HANDLE ClientHandle)
 
DWORD _RpcOpenHandle (wchar_t *arg_1, DWORD dwClientVersion, DWORD *pdwNegotiatedVersion, LPWLANSVC_RPC_HANDLE phClientHandle)
 
DWORD _RpcCloseHandle (LPWLANSVC_RPC_HANDLE phClientHandle)
 
DWORD _RpcEnumInterfaces (WLANSVC_RPC_HANDLE hClientHandle, PWLAN_INTERFACE_INFO_LIST *ppInterfaceList)
 
DWORD _RpcSetAutoConfigParameter (WLANSVC_RPC_HANDLE hClientHandle, long OpCode, DWORD dwDataSize, LPBYTE pData)
 
DWORD _RpcQueryAutoConfigParameter (WLANSVC_RPC_HANDLE hClientHandle, DWORD OpCode, LPDWORD pdwDataSize, char **ppData, DWORD *pWlanOpcodeValueType)
 
DWORD _RpcGetInterfaceCapability (WLANSVC_RPC_HANDLE hClientHandle, const GUID *pInterfaceGuid, PWLAN_INTERFACE_CAPABILITY *ppCapability)
 
DWORD _RpcSetInterface (WLANSVC_RPC_HANDLE hClientHandle, const GUID *pInterfaceGuid, DWORD OpCode, DWORD dwDataSize, LPBYTE pData)
 
DWORD _RpcQueryInterface (WLANSVC_RPC_HANDLE hClientHandle, const GUID *pInterfaceGuid, long OpCode, LPDWORD pdwDataSize, LPBYTE *ppData, LPDWORD pWlanOpcodeValueType)
 
DWORD _RpcIhvControl (WLANSVC_RPC_HANDLE hClientHandle, const GUID *pInterfaceGuid, DWORD Type, DWORD dwInBufferSize, LPBYTE pInBuffer, DWORD dwOutBufferSize, LPBYTE pOutBuffer, LPDWORD pdwBytesReturned)
 
DWORD _RpcScan (WLANSVC_RPC_HANDLE hClientHandle, const GUID *pInterfaceGuid, PDOT11_SSID pDot11Ssid, PWLAN_RAW_DATA pIeData)
 
DWORD _RpcGetAvailableNetworkList (WLANSVC_RPC_HANDLE hClientHandle, const GUID *pInterfaceGuid, DWORD dwFlags, WLAN_AVAILABLE_NETWORK_LIST **ppAvailableNetworkList)
 
DWORD _RpcGetNetworkBssList (WLANSVC_RPC_HANDLE hClientHandle, const GUID *pInterfaceGuid, PDOT11_SSID pDot11Ssid, short dot11BssType, DWORD bSecurityEnabled, LPDWORD dwBssListSize, LPBYTE *ppWlanBssList)
 
DWORD _RpcConnect (WLANSVC_RPC_HANDLE hClientHandle, const GUID *pInterfaceGuid, const PWLAN_CONNECTION_PARAMETERS *pConnectionParameters)
 
DWORD _RpcDisconnect (WLANSVC_RPC_HANDLE hClientHandle, const GUID *pInterfaceGUID)
 
DWORD _RpcRegisterNotification (WLANSVC_RPC_HANDLE hClientHandle, DWORD arg_2, LPDWORD pdwPrevNotifSource)
 
DWORD _RpcAsyncGetNotification (WLANSVC_RPC_HANDLE hClientHandle, PWLAN_NOTIFICATION_DATA *NotificationData)
 
DWORD _RpcSetProfileEapUserData (WLANSVC_RPC_HANDLE hClientHandle, const GUID *pInterfaceGuid, wchar_t *strProfileName, EAP_METHOD_TYPE MethodType, DWORD dwFlags, DWORD dwEapUserDataSize, LPBYTE pbEapUserData)
 
DWORD _RpcSetProfile (WLANSVC_RPC_HANDLE hClientHandle, const GUID *pInterfaceGuid, DWORD dwFlags, wchar_t *strProfileXml, wchar_t *strAllUserProfileSecurity, BOOL bOverwrite, LPDWORD pdwReasonCode)
 
DWORD _RpcGetProfile (WLANSVC_RPC_HANDLE hClientHandle, const GUID *pInterfaceGuid, wchar_t *strProfileName, wchar_t **pstrProfileXml, LPDWORD pdwFlags, LPDWORD pdwGrantedAccess)
 
DWORD _RpcDeleteProfile (WLANSVC_RPC_HANDLE hClientHandle, const GUID *pInterfaceGuid, const wchar_t *strProfileName)
 
DWORD _RpcRenameProfile (WLANSVC_RPC_HANDLE hClientHandle, const GUID *pInterfaceGuid, const wchar_t *strOldProfileName, const wchar_t *strNewProfileName)
 
DWORD _RpcSetProfileList (WLANSVC_RPC_HANDLE hClientHandle, const GUID *pInterfaceGuid, DWORD dwItems, BYTE **strProfileNames)
 
DWORD _RpcGetProfileList (WLANSVC_RPC_HANDLE hClientHandle, const GUID *pInterfaceGuid, PWLAN_PROFILE_INFO_LIST *ppProfileList)
 
DWORD _RpcSetProfilePosition (WLANSVC_RPC_HANDLE hClientHandle, const GUID *pInterfaceGuid, wchar_t *strProfileName, DWORD dwPosition)
 
DWORD _RpcSetProfileCustomUserData (WLANSVC_RPC_HANDLE hClientHandle, const GUID *pInterfaceGuid, wchar_t *strProfileName, DWORD dwDataSize, LPBYTE pData)
 
DWORD _RpcGetProfileCustomUserData (WLANSVC_RPC_HANDLE hClientHandle, const GUID *pInterfaceGuid, wchar_t *strProfileName, LPDWORD dwDataSize, LPBYTE *pData)
 
DWORD _RpcSetFilterList (WLANSVC_RPC_HANDLE hClientHandle, short wlanFilterListType, PDOT11_NETWORK_LIST pNetworkList)
 
DWORD _RpcGetFilterList (WLANSVC_RPC_HANDLE hClientHandle, short wlanFilterListType, PDOT11_NETWORK_LIST *pNetworkList)
 
DWORD _RpcSetPsdIEDataList (WLANSVC_RPC_HANDLE hClientHandle, wchar_t *strFormat, DWORD dwDataListSize, LPBYTE pPsdIEDataList)
 
DWORD _RpcSaveTemporaryProfile (WLANSVC_RPC_HANDLE hClientHandle, const GUID *pInterfaceGuid, wchar_t *strProfileName, wchar_t *strAllUserProfileSecurity, DWORD dwFlags, BOOL bOverWrite)
 
DWORD _RpcIsUIRequestPending (wchar_t *arg_1, const GUID *pInterfaceGuid, struct_C *arg_3, LPDWORD arg_4)
 
DWORD _RpcSetUIForwardingNetworkList (wchar_t *arg_1, GUID *arg_2, DWORD dwSize, GUID *arg_4)
 
DWORD _RpcIsNetworkSuppressed (wchar_t *arg_1, DWORD arg_2, const GUID *pInterfaceGuid, LPDWORD arg_4)
 
DWORD _RpcRemoveUIForwardingNetworkList (wchar_t *arg_1, const GUID *pInterfaceGuid)
 
DWORD _RpcQueryExtUIRequest (wchar_t *arg_1, GUID *arg_2, GUID *arg_3, short arg_4, GUID *pInterfaceGuid, struct_C **arg_6)
 
DWORD _RpcUIResponse (wchar_t *arg_1, struct_C *arg_2, struct_D *arg_3)
 
DWORD _RpcGetProfileKeyInfo (wchar_t *arg_1, DWORD arg_2, const GUID *pInterfaceGuid, wchar_t *arg_4, DWORD arg_5, LPDWORD arg_6, char *arg_7, LPDWORD arg_8)
 
DWORD _RpcAsyncDoPlap (wchar_t *arg_1, const GUID *pInterfaceGuid, wchar_t *arg_3, DWORD dwSize, struct_E arg_5[])
 
DWORD _RpcQueryPlapCredentials (wchar_t *arg_1, LPDWORD dwSize, struct_E **arg_3, wchar_t **arg_4, GUID *pInterfaceGuid, LPDWORD arg_6, LPDWORD arg_7, LPDWORD arg_8, LPDWORD arg_9)
 
DWORD _RpcCancelPlap (wchar_t *arg_1, const GUID *pInterfaceGuid)
 
DWORD _RpcSetSecuritySettings (WLANSVC_RPC_HANDLE hClientHandle, WLAN_SECURABLE_OBJECT SecurableObject, const wchar_t *strModifiedSDDL)
 
DWORD _RpcGetSecuritySettings (WLANSVC_RPC_HANDLE hClientHandle, WLAN_SECURABLE_OBJECT SecurableObject, WLAN_OPCODE_VALUE_TYPE *pValueType, wchar_t **pstrCurrentSDDL, LPDWORD pdwGrantedAccess)
 
void __RPC_FAR *__RPC_USER midl_user_allocate (SIZE_T len)
 
void __RPC_USER midl_user_free (void __RPC_FAR *ptr)
 
void __RPC_USER WLANSVC_RPC_HANDLE_rundown (WLANSVC_RPC_HANDLE hClientHandle)
 

Variables

LIST_ENTRY WlanSvcHandleListHead
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 11 of file rpcserver.c.

Function Documentation

◆ _RpcAsyncDoPlap()

DWORD _RpcAsyncDoPlap ( wchar_t arg_1,
const GUID pInterfaceGuid,
wchar_t arg_3,
DWORD  dwSize,
struct_E  arg_5[] 
)

Definition at line 565 of file rpcserver.c.

571 {
574 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcAsyncGetNotification()

DWORD _RpcAsyncGetNotification ( WLANSVC_RPC_HANDLE  hClientHandle,
PWLAN_NOTIFICATION_DATA NotificationData 
)

Definition at line 336 of file rpcserver.c.

339 {
342 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcCancelPlap()

DWORD _RpcCancelPlap ( wchar_t arg_1,
const GUID pInterfaceGuid 
)

Definition at line 591 of file rpcserver.c.

594 {
597 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcCloseHandle()

DWORD _RpcCloseHandle ( LPWLANSVC_RPC_HANDLE  phClientHandle)

Definition at line 97 of file rpcserver.c.

Referenced by WlanCloseHandle().

99 {
100  PWLANSVCHANDLE lpWlanSvcHandle;
101 
102  lpWlanSvcHandle = WlanSvcGetHandleEntry(*phClientHandle);
103  if (!lpWlanSvcHandle)
104  {
105  return ERROR_INVALID_HANDLE;
106  }
107 
108  RemoveEntryList(&lpWlanSvcHandle->WlanSvcHandleListEntry);
109  HeapFree(GetProcessHeap(), 0, lpWlanSvcHandle);
110 
111  return ERROR_SUCCESS;
112 }
LIST_ENTRY WlanSvcHandleListEntry
Definition: precomp.h:20
#define ERROR_SUCCESS
Definition: deptool.c:10
#define ERROR_INVALID_HANDLE
Definition: compat.h:88
FORCEINLINE BOOLEAN RemoveEntryList(_In_ PLIST_ENTRY Entry)
Definition: rtlfuncs.h:105
PWLANSVCHANDLE WlanSvcGetHandleEntry(LPWLANSVC_RPC_HANDLE ClientHandle)
Definition: rpcserver.c:47
#define GetProcessHeap()
Definition: compat.h:395
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ _RpcConnect()

DWORD _RpcConnect ( WLANSVC_RPC_HANDLE  hClientHandle,
const GUID pInterfaceGuid,
const PWLAN_CONNECTION_PARAMETERS pConnectionParameters 
)

Definition at line 310 of file rpcserver.c.

Referenced by WlanConnect().

314 {
317 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcDeleteProfile()

DWORD _RpcDeleteProfile ( WLANSVC_RPC_HANDLE  hClientHandle,
const GUID pInterfaceGuid,
const wchar_t strProfileName 
)

Definition at line 382 of file rpcserver.c.

Referenced by WlanDeleteProfile().

386 {
389 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcDisconnect()

DWORD _RpcDisconnect ( WLANSVC_RPC_HANDLE  hClientHandle,
const GUID pInterfaceGUID 
)

Definition at line 319 of file rpcserver.c.

Referenced by WlanDisconnect().

322 {
325 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcEnumInterfaces()

DWORD _RpcEnumInterfaces ( WLANSVC_RPC_HANDLE  hClientHandle,
PWLAN_INTERFACE_INFO_LIST ppInterfaceList 
)

Definition at line 114 of file rpcserver.c.

Referenced by WlanEnumInterfaces().

117 {
118 #if GET_IF_ENTRY2_IMPLEMENTED
119  DWORD dwNumInterfaces;
120  DWORD dwResult, dwSize;
121  DWORD dwIndex;
122  MIB_IF_ROW2 IfRow;
124 
125  dwResult = GetNumberOfInterfaces(&dwNumInterfaces);
126  dwSize = sizeof(WLAN_INTERFACE_INFO_LIST);
127  if (dwResult != NO_ERROR)
128  {
129  /* set num interfaces to zero when an error occurs */
130  dwNumInterfaces = 0;
131  }
132  else
133  {
134  if (dwNumInterfaces > 1)
135  {
136  /* add extra size for interface */
137  dwSize += (dwNumInterfaces-1) * sizeof(WLAN_INTERFACE_INFO);
138  }
139  }
140 
141  /* allocate interface list */
142  InterfaceList = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, dwSize);
143  if (!InterfaceList)
144  {
146  }
147 
148  *ppInterfaceList = InterfaceList;
149  if (!dwNumInterfaces)
150  {
151  return ERROR_SUCCESS;
152  }
153 
154  for(dwIndex = 0; dwIndex < dwNumInterfaces; dwIndex++)
155  {
156  ZeroMemory(&IfRow, sizeof(MIB_IF_ROW2));
157  IfRow.InterfaceIndex = dwIndex;
158 
159  dwResult = GetIfEntry2(&IfRow);
160  if (dwResult == NO_ERROR)
161  {
162  if (IfRow.Type == IF_TYPE_IEEE80211 && IfRow.InterfaceAndOperStatusFlags.HardwareInterface)
163  {
164  RtlMoveMemory(&InterfaceList->InterfaceInfo[InterfaceList->dwNumberOfItems].InterfaceGuid, &IfRow.InterfaceGuid, sizeof(GUID));
165  wcscpy(InterfaceList->InterfaceInfo[InterfaceList->dwNumberOfItems].strInterfaceDescription, IfRow.Description);
166  //FIXME set state
167  InterfaceList->dwNumberOfItems++;
168  }
169  }
170  }
171 
172  return ERROR_SUCCESS;
173 #else
176 #endif
177 }
#define ERROR_SUCCESS
Definition: deptool.c:10
WCHAR strInterfaceDescription[256]
Definition: wlanapi.h:142
_In_ PUSBD_INTERFACE_LIST_ENTRY InterfaceList
Definition: usbdlib.h:168
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
#define ZeroMemory
Definition: winbase.h:1635
#define NO_ERROR
Definition: dderror.h:5
#define RtlMoveMemory(Destination, Source, Length)
Definition: typedefs.h:263
WLAN_INTERFACE_INFO InterfaceInfo[1]
Definition: wlanapi.h:152
#define IF_TYPE_IEEE80211
Definition: ipifcons.h:91
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
unsigned long DWORD
Definition: ntddk_ex.h:95
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
struct _WLAN_INTERFACE_INFO_LIST WLAN_INTERFACE_INFO_LIST
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114
DWORD WINAPI GetNumberOfInterfaces(PDWORD pdwNumIf)
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:54

◆ _RpcGetAvailableNetworkList()

DWORD _RpcGetAvailableNetworkList ( WLANSVC_RPC_HANDLE  hClientHandle,
const GUID pInterfaceGuid,
DWORD  dwFlags,
WLAN_AVAILABLE_NETWORK_LIST **  ppAvailableNetworkList 
)

Definition at line 287 of file rpcserver.c.

292 {
295 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcGetFilterList()

DWORD _RpcGetFilterList ( WLANSVC_RPC_HANDLE  hClientHandle,
short  wlanFilterListType,
PDOT11_NETWORK_LIST pNetworkList 
)

Definition at line 461 of file rpcserver.c.

465 {
468 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcGetInterfaceCapability()

DWORD _RpcGetInterfaceCapability ( WLANSVC_RPC_HANDLE  hClientHandle,
const GUID pInterfaceGuid,
PWLAN_INTERFACE_CAPABILITY ppCapability 
)

Definition at line 200 of file rpcserver.c.

204 {
205  PWLANSVCHANDLE lpWlanSvcHandle;
206 
207  lpWlanSvcHandle = WlanSvcGetHandleEntry(hClientHandle);
208  if (!lpWlanSvcHandle)
209  {
210  return ERROR_INVALID_HANDLE;
211  }
212 
215 }
#define ERROR_INVALID_HANDLE
Definition: compat.h:88
PWLANSVCHANDLE WlanSvcGetHandleEntry(LPWLANSVC_RPC_HANDLE ClientHandle)
Definition: rpcserver.c:47
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcGetNetworkBssList()

DWORD _RpcGetNetworkBssList ( WLANSVC_RPC_HANDLE  hClientHandle,
const GUID pInterfaceGuid,
PDOT11_SSID  pDot11Ssid,
short  dot11BssType,
DWORD  bSecurityEnabled,
LPDWORD  dwBssListSize,
LPBYTE ppWlanBssList 
)

Definition at line 297 of file rpcserver.c.

305 {
308 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcGetProfile()

DWORD _RpcGetProfile ( WLANSVC_RPC_HANDLE  hClientHandle,
const GUID pInterfaceGuid,
wchar_t strProfileName,
wchar_t **  pstrProfileXml,
LPDWORD  pdwFlags,
LPDWORD  pdwGrantedAccess 
)

Definition at line 370 of file rpcserver.c.

377 {
380 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcGetProfileCustomUserData()

DWORD _RpcGetProfileCustomUserData ( WLANSVC_RPC_HANDLE  hClientHandle,
const GUID pInterfaceGuid,
wchar_t strProfileName,
LPDWORD  dwDataSize,
LPBYTE pData 
)

Definition at line 441 of file rpcserver.c.

447 {
450 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcGetProfileKeyInfo()

DWORD _RpcGetProfileKeyInfo ( wchar_t arg_1,
DWORD  arg_2,
const GUID pInterfaceGuid,
wchar_t arg_4,
DWORD  arg_5,
LPDWORD  arg_6,
char arg_7,
LPDWORD  arg_8 
)

Definition at line 551 of file rpcserver.c.

560 {
563 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcGetProfileList()

DWORD _RpcGetProfileList ( WLANSVC_RPC_HANDLE  hClientHandle,
const GUID pInterfaceGuid,
PWLAN_PROFILE_INFO_LIST ppProfileList 
)

Definition at line 411 of file rpcserver.c.

415 {
418 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcGetSecuritySettings()

DWORD _RpcGetSecuritySettings ( WLANSVC_RPC_HANDLE  hClientHandle,
WLAN_SECURABLE_OBJECT  SecurableObject,
WLAN_OPCODE_VALUE_TYPE pValueType,
wchar_t **  pstrCurrentSDDL,
LPDWORD  pdwGrantedAccess 
)

Definition at line 608 of file rpcserver.c.

614 {
617 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcIhvControl()

DWORD _RpcIhvControl ( WLANSVC_RPC_HANDLE  hClientHandle,
const GUID pInterfaceGuid,
DWORD  Type,
DWORD  dwInBufferSize,
LPBYTE  pInBuffer,
DWORD  dwOutBufferSize,
LPBYTE  pOutBuffer,
LPDWORD  pdwBytesReturned 
)

Definition at line 240 of file rpcserver.c.

249 {
252 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcIsNetworkSuppressed()

DWORD _RpcIsNetworkSuppressed ( wchar_t arg_1,
DWORD  arg_2,
const GUID pInterfaceGuid,
LPDWORD  arg_4 
)

Definition at line 512 of file rpcserver.c.

517 {
520 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcIsUIRequestPending()

DWORD _RpcIsUIRequestPending ( wchar_t arg_1,
const GUID pInterfaceGuid,
struct_C arg_3,
LPDWORD  arg_4 
)

Definition at line 492 of file rpcserver.c.

497 {
500 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcOpenHandle()

DWORD _RpcOpenHandle ( wchar_t arg_1,
DWORD  dwClientVersion,
DWORD pdwNegotiatedVersion,
LPWLANSVC_RPC_HANDLE  phClientHandle 
)

Definition at line 67 of file rpcserver.c.

Referenced by WlanOpenHandle().

72 {
73  PWLANSVCHANDLE lpWlanSvcHandle;
74 
75  lpWlanSvcHandle = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WLANSVCHANDLE));
76  if (lpWlanSvcHandle == NULL)
77  {
78  DPRINT1("Failed to allocate Heap!\n");
80  }
81 
82  if (dwClientVersion > 2)
83  dwClientVersion = 2;
84 
85  if (dwClientVersion < 1)
86  dwClientVersion = 1;
87 
88  lpWlanSvcHandle->dwClientVersion = dwClientVersion;
89  *pdwNegotiatedVersion = dwClientVersion;
90 
92  *phClientHandle = lpWlanSvcHandle;
93 
94  return ERROR_SUCCESS;
95 }
LIST_ENTRY WlanSvcHandleListEntry
Definition: precomp.h:20
#define ERROR_SUCCESS
Definition: deptool.c:10
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
#define InsertTailList(ListHead, Entry)
smooth NULL
Definition: ftsmooth.c:416
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LIST_ENTRY WlanSvcHandleListHead
Definition: rpcserver.c:15
DWORD dwClientVersion
Definition: precomp.h:21
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
#define DPRINT1
Definition: precomp.h:8

◆ _RpcQueryAutoConfigParameter()

DWORD _RpcQueryAutoConfigParameter ( WLANSVC_RPC_HANDLE  hClientHandle,
DWORD  OpCode,
LPDWORD  pdwDataSize,
char **  ppData,
DWORD pWlanOpcodeValueType 
)

Definition at line 189 of file rpcserver.c.

195 {
198 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcQueryExtUIRequest()

DWORD _RpcQueryExtUIRequest ( wchar_t arg_1,
GUID arg_2,
GUID arg_3,
short  arg_4,
GUID pInterfaceGuid,
struct_C **  arg_6 
)

Definition at line 530 of file rpcserver.c.

537 {
540 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcQueryInterface()

DWORD _RpcQueryInterface ( WLANSVC_RPC_HANDLE  hClientHandle,
const GUID pInterfaceGuid,
long  OpCode,
LPDWORD  pdwDataSize,
LPBYTE ppData,
LPDWORD  pWlanOpcodeValueType 
)

Definition at line 228 of file rpcserver.c.

235 {
238 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcQueryPlapCredentials()

DWORD _RpcQueryPlapCredentials ( wchar_t arg_1,
LPDWORD  dwSize,
struct_E **  arg_3,
wchar_t **  arg_4,
GUID pInterfaceGuid,
LPDWORD  arg_6,
LPDWORD  arg_7,
LPDWORD  arg_8,
LPDWORD  arg_9 
)

Definition at line 576 of file rpcserver.c.

586 {
589 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcRegisterNotification()

DWORD _RpcRegisterNotification ( WLANSVC_RPC_HANDLE  hClientHandle,
DWORD  arg_2,
LPDWORD  pdwPrevNotifSource 
)

Definition at line 327 of file rpcserver.c.

331 {
334 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcRemoveUIForwardingNetworkList()

DWORD _RpcRemoveUIForwardingNetworkList ( wchar_t arg_1,
const GUID pInterfaceGuid 
)

Definition at line 522 of file rpcserver.c.

525 {
528 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcRenameProfile()

DWORD _RpcRenameProfile ( WLANSVC_RPC_HANDLE  hClientHandle,
const GUID pInterfaceGuid,
const wchar_t strOldProfileName,
const wchar_t strNewProfileName 
)

Definition at line 391 of file rpcserver.c.

Referenced by WlanRenameProfile().

396 {
399 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcSaveTemporaryProfile()

DWORD _RpcSaveTemporaryProfile ( WLANSVC_RPC_HANDLE  hClientHandle,
const GUID pInterfaceGuid,
wchar_t strProfileName,
wchar_t strAllUserProfileSecurity,
DWORD  dwFlags,
BOOL  bOverWrite 
)

Definition at line 480 of file rpcserver.c.

487 {
490 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcScan()

DWORD _RpcScan ( WLANSVC_RPC_HANDLE  hClientHandle,
const GUID pInterfaceGuid,
PDOT11_SSID  pDot11Ssid,
PWLAN_RAW_DATA  pIeData 
)

Definition at line 254 of file rpcserver.c.

Referenced by WlanScan().

259 {
260  PWLANSVCHANDLE lpWlanSvcHandle;
261 
262  lpWlanSvcHandle = WlanSvcGetHandleEntry(hClientHandle);
263  if (!lpWlanSvcHandle)
264  {
265  return ERROR_INVALID_HANDLE;
266  }
267 
268  /*
269  DWORD dwBytesReturned;
270  HANDLE hDevice;
271  ULONG OidCode = OID_802_11_BSSID_LIST_SCAN;
272  PNDIS_802_11_BSSID_LIST pBssIDList;
273 
274  DeviceIoControl(hDevice,
275  IOCTL_NDIS_QUERY_GLOBAL_STATS,
276  &OidCode,
277  sizeof(ULONG),
278  NULL,
279  0,
280  &dwBytesReturned,
281  NULL);
282 */
285 }
#define ERROR_INVALID_HANDLE
Definition: compat.h:88
PWLANSVCHANDLE WlanSvcGetHandleEntry(LPWLANSVC_RPC_HANDLE ClientHandle)
Definition: rpcserver.c:47
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcSetAutoConfigParameter()

DWORD _RpcSetAutoConfigParameter ( WLANSVC_RPC_HANDLE  hClientHandle,
long  OpCode,
DWORD  dwDataSize,
LPBYTE  pData 
)

Definition at line 179 of file rpcserver.c.

184 {
187 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcSetFilterList()

DWORD _RpcSetFilterList ( WLANSVC_RPC_HANDLE  hClientHandle,
short  wlanFilterListType,
PDOT11_NETWORK_LIST  pNetworkList 
)

Definition at line 452 of file rpcserver.c.

456 {
459 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcSetInterface()

DWORD _RpcSetInterface ( WLANSVC_RPC_HANDLE  hClientHandle,
const GUID pInterfaceGuid,
DWORD  OpCode,
DWORD  dwDataSize,
LPBYTE  pData 
)

Definition at line 217 of file rpcserver.c.

223 {
226 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcSetProfile()

DWORD _RpcSetProfile ( WLANSVC_RPC_HANDLE  hClientHandle,
const GUID pInterfaceGuid,
DWORD  dwFlags,
wchar_t strProfileXml,
wchar_t strAllUserProfileSecurity,
BOOL  bOverwrite,
LPDWORD  pdwReasonCode 
)

Definition at line 357 of file rpcserver.c.

365 {
368 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcSetProfileCustomUserData()

DWORD _RpcSetProfileCustomUserData ( WLANSVC_RPC_HANDLE  hClientHandle,
const GUID pInterfaceGuid,
wchar_t strProfileName,
DWORD  dwDataSize,
LPBYTE  pData 
)

Definition at line 430 of file rpcserver.c.

436 {
439 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcSetProfileEapUserData()

DWORD _RpcSetProfileEapUserData ( WLANSVC_RPC_HANDLE  hClientHandle,
const GUID pInterfaceGuid,
wchar_t strProfileName,
EAP_METHOD_TYPE  MethodType,
DWORD  dwFlags,
DWORD  dwEapUserDataSize,
LPBYTE  pbEapUserData 
)

Definition at line 344 of file rpcserver.c.

352 {
355 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcSetProfileList()

DWORD _RpcSetProfileList ( WLANSVC_RPC_HANDLE  hClientHandle,
const GUID pInterfaceGuid,
DWORD  dwItems,
BYTE **  strProfileNames 
)

Definition at line 401 of file rpcserver.c.

406 {
409 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcSetProfilePosition()

DWORD _RpcSetProfilePosition ( WLANSVC_RPC_HANDLE  hClientHandle,
const GUID pInterfaceGuid,
wchar_t strProfileName,
DWORD  dwPosition 
)

Definition at line 420 of file rpcserver.c.

425 {
428 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcSetPsdIEDataList()

DWORD _RpcSetPsdIEDataList ( WLANSVC_RPC_HANDLE  hClientHandle,
wchar_t strFormat,
DWORD  dwDataListSize,
LPBYTE  pPsdIEDataList 
)

Definition at line 470 of file rpcserver.c.

475 {
478 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcSetSecuritySettings()

DWORD _RpcSetSecuritySettings ( WLANSVC_RPC_HANDLE  hClientHandle,
WLAN_SECURABLE_OBJECT  SecurableObject,
const wchar_t strModifiedSDDL 
)

Definition at line 599 of file rpcserver.c.

Referenced by WlanSetSecuritySettings().

603 {
606 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcSetUIForwardingNetworkList()

DWORD _RpcSetUIForwardingNetworkList ( wchar_t arg_1,
GUID arg_2,
DWORD  dwSize,
GUID arg_4 
)

Definition at line 502 of file rpcserver.c.

507 {
510 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ _RpcUIResponse()

DWORD _RpcUIResponse ( wchar_t arg_1,
struct_C arg_2,
struct_D arg_3 
)

Definition at line 542 of file rpcserver.c.

546 {
549 }
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
#define UNIMPLEMENTED
Definition: debug.h:114

◆ midl_user_allocate()

void __RPC_FAR* __RPC_USER midl_user_allocate ( SIZE_T  len)

Definition at line 619 of file rpcserver.c.

620 {
622 }
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
GLenum GLsizei len
Definition: glext.h:6722
#define HEAP_ZERO_MEMORY
Definition: compat.h:123

◆ midl_user_free()

void __RPC_USER midl_user_free ( void __RPC_FAR ptr)

Definition at line 625 of file rpcserver.c.

626 {
627  HeapFree(GetProcessHeap(), 0, ptr);
628 }
static PVOID ptr
Definition: dispmode.c:27
#define GetProcessHeap()
Definition: compat.h:395
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ RpcThreadRoutine()

DWORD WINAPI RpcThreadRoutine ( LPVOID  lpParameter)

Definition at line 17 of file rpcserver.c.

Referenced by LogfFreeRecord(), ServiceInit(), and ServiceMain().

18 {
20 
22 
23  Status = RpcServerUseProtseqEpW(L"ncalrpc", 20, L"wlansvc", NULL);
24  if (Status != RPC_S_OK)
25  {
26  DPRINT("RpcServerUseProtseqEpW() failed (Status %lx)\n", Status);
27  return 0;
28  }
29 
30  Status = RpcServerRegisterIf(wlansvc_interface_v1_0_s_ifspec, NULL, NULL);
31  if (Status != RPC_S_OK)
32  {
33  DPRINT("RpcServerRegisterIf() failed (Status %lx)\n", Status);
34  return 0;
35  }
36 
38  if (Status != RPC_S_OK)
39  {
40  DPRINT("RpcServerListen() failed (Status %lx)\n", Status);
41  }
42 
43  DPRINT("RpcServerListen finished\n");
44  return 0;
45 }
long RPC_STATUS
Definition: rpc.h:52
RPC_STATUS WINAPI RpcServerListen(UINT MinimumCallThreads, UINT MaxCalls, UINT DontWait)
Definition: rpc_server.c:1527
#define RPC_C_LISTEN_MAX_CALLS_DEFAULT
Definition: rpcdce.h:122
smooth NULL
Definition: ftsmooth.c:416
void DPRINT(...)
Definition: polytest.cpp:61
RPC_STATUS WINAPI RpcServerRegisterIf(RPC_IF_HANDLE IfSpec, UUID *MgrTypeUuid, RPC_MGR_EPV *MgrEpv)
Definition: rpc_server.c:1123
static const WCHAR L[]
Definition: oid.c:1087
LIST_ENTRY WlanSvcHandleListHead
Definition: rpcserver.c:15
Status
Definition: gdiplustypes.h:24
RPC_STATUS WINAPI RpcServerUseProtseqEpW(RPC_WSTR Protseq, UINT MaxCalls, RPC_WSTR Endpoint, LPVOID SecurityDescriptor)
Definition: rpc_server.c:934
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
#define RPC_S_OK
Definition: rpcnterr.h:22

◆ WLANSVC_RPC_HANDLE_rundown()

void __RPC_USER WLANSVC_RPC_HANDLE_rundown ( WLANSVC_RPC_HANDLE  hClientHandle)

Definition at line 631 of file rpcserver.c.

632 {
633 }

◆ WlanSvcGetHandleEntry()

PWLANSVCHANDLE WlanSvcGetHandleEntry ( LPWLANSVC_RPC_HANDLE  ClientHandle)

Definition at line 47 of file rpcserver.c.

Referenced by _RpcCloseHandle(), _RpcGetInterfaceCapability(), and _RpcScan().

48 {
49  PLIST_ENTRY CurrentEntry;
50  PWLANSVCHANDLE lpWlanSvcHandle;
51 
52  CurrentEntry = WlanSvcHandleListHead.Flink;
53  while (CurrentEntry != &WlanSvcHandleListHead)
54  {
55  lpWlanSvcHandle = CONTAINING_RECORD(CurrentEntry,
57  WlanSvcHandleListEntry);
58  CurrentEntry = CurrentEntry->Flink;
59 
60  if (lpWlanSvcHandle == (PWLANSVCHANDLE) ClientHandle)
61  return lpWlanSvcHandle;
62  }
63 
64  return NULL;
65 }
smooth NULL
Definition: ftsmooth.c:416
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
struct _LIST_ENTRY * Flink
Definition: typedefs.h:119
LIST_ENTRY WlanSvcHandleListHead
Definition: rpcserver.c:15
Definition: typedefs.h:117

Variable Documentation

◆ WlanSvcHandleListHead

LIST_ENTRY WlanSvcHandleListHead

Definition at line 15 of file rpcserver.c.