mirror of
https://github.com/reactos/reactos.git
synced 2025-07-28 01:41:48 +00:00
[WLANAPI]
partially implement RpcOpenHandle and RpcCloseHandle svn path=/trunk/; revision=66557
This commit is contained in:
parent
edb65177d2
commit
0117e3b8cb
7 changed files with 208 additions and 86 deletions
|
@ -12,4 +12,13 @@
|
||||||
#include <winsvc.h>
|
#include <winsvc.h>
|
||||||
#include <wlansvc_s.h>
|
#include <wlansvc_s.h>
|
||||||
|
|
||||||
|
#include <ndk/rtlfuncs.h>
|
||||||
|
#include <ndk/obfuncs.h>
|
||||||
|
|
||||||
|
typedef struct _WLANSVCHANDLE
|
||||||
|
{
|
||||||
|
LIST_ENTRY WlanSvcHandleListEntry;
|
||||||
|
DWORD dwClientVersion;
|
||||||
|
} WLANSVCHANDLE, *PWLANSVCHANDLE;
|
||||||
|
|
||||||
#endif /* _WLANSVC_PCH_ */
|
#endif /* _WLANSVC_PCH_ */
|
||||||
|
|
|
@ -12,21 +12,103 @@
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
//#define GET_IF_ENTRY2_IMPLEMENTED 1
|
//#define GET_IF_ENTRY2_IMPLEMENTED 1
|
||||||
|
|
||||||
|
LIST_ENTRY WlanSvcHandleListHead;
|
||||||
|
|
||||||
|
DWORD WINAPI RpcThreadRoutine(LPVOID lpParameter)
|
||||||
|
{
|
||||||
|
RPC_STATUS Status;
|
||||||
|
|
||||||
|
InitializeListHead(&WlanSvcHandleListHead);
|
||||||
|
|
||||||
|
Status = RpcServerUseProtseqEpW(L"ncalrpc", 20, L"wlansvc", NULL);
|
||||||
|
if (Status != RPC_S_OK)
|
||||||
|
{
|
||||||
|
DPRINT("RpcServerUseProtseqEpW() failed (Status %lx)\n", Status);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
Status = RpcServerRegisterIf(wlansvc_interface_v1_0_s_ifspec, NULL, NULL);
|
||||||
|
if (Status != RPC_S_OK)
|
||||||
|
{
|
||||||
|
DPRINT("RpcServerRegisterIf() failed (Status %lx)\n", Status);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
Status = RpcServerListen(1, RPC_C_LISTEN_MAX_CALLS_DEFAULT, 0);
|
||||||
|
if (Status != RPC_S_OK)
|
||||||
|
{
|
||||||
|
DPRINT("RpcServerListen() failed (Status %lx)\n", Status);
|
||||||
|
}
|
||||||
|
|
||||||
|
DPRINT("RpcServerListen finished\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
PWLANSVCHANDLE WlanSvcGetHandleEntry(LPWLANSVC_RPC_HANDLE ClientHandle)
|
||||||
|
{
|
||||||
|
PLIST_ENTRY CurrentEntry;
|
||||||
|
PWLANSVCHANDLE lpWlanSvcHandle;
|
||||||
|
|
||||||
|
CurrentEntry = WlanSvcHandleListHead.Flink;
|
||||||
|
while (CurrentEntry != &WlanSvcHandleListHead)
|
||||||
|
{
|
||||||
|
lpWlanSvcHandle = CONTAINING_RECORD(CurrentEntry,
|
||||||
|
WLANSVCHANDLE,
|
||||||
|
WlanSvcHandleListEntry);
|
||||||
|
CurrentEntry = CurrentEntry->Flink;
|
||||||
|
|
||||||
|
if (lpWlanSvcHandle == (PWLANSVCHANDLE) ClientHandle)
|
||||||
|
return lpWlanSvcHandle;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
DWORD _RpcOpenHandle(
|
DWORD _RpcOpenHandle(
|
||||||
wchar_t *arg_1,
|
wchar_t *arg_1,
|
||||||
DWORD dwClientVersion,
|
DWORD dwClientVersion,
|
||||||
DWORD *pdwNegotiatedVersion,
|
DWORD *pdwNegotiatedVersion,
|
||||||
LPWLANSVC_RPC_HANDLE phClientHandle)
|
LPWLANSVC_RPC_HANDLE phClientHandle)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
PWLANSVCHANDLE lpWlanSvcHandle;
|
||||||
return ERROR_CALL_NOT_IMPLEMENTED;
|
|
||||||
|
lpWlanSvcHandle = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WLANSVCHANDLE));
|
||||||
|
if (lpWlanSvcHandle == NULL)
|
||||||
|
{
|
||||||
|
DPRINT1("Failed to allocate Heap!\n");
|
||||||
|
return ERROR_NOT_ENOUGH_MEMORY;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dwClientVersion > 2)
|
||||||
|
dwClientVersion = 2;
|
||||||
|
|
||||||
|
if (dwClientVersion < 1)
|
||||||
|
dwClientVersion = 1;
|
||||||
|
|
||||||
|
lpWlanSvcHandle->dwClientVersion = dwClientVersion;
|
||||||
|
*pdwNegotiatedVersion = dwClientVersion;
|
||||||
|
|
||||||
|
InsertTailList(&WlanSvcHandleListHead, &lpWlanSvcHandle->WlanSvcHandleListEntry);
|
||||||
|
*phClientHandle = lpWlanSvcHandle;
|
||||||
|
|
||||||
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD _RpcCloseHandle(
|
DWORD _RpcCloseHandle(
|
||||||
LPWLANSVC_RPC_HANDLE phClientHandle)
|
LPWLANSVC_RPC_HANDLE phClientHandle)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
PWLANSVCHANDLE lpWlanSvcHandle;
|
||||||
return ERROR_CALL_NOT_IMPLEMENTED;
|
|
||||||
|
lpWlanSvcHandle = WlanSvcGetHandleEntry(phClientHandle);
|
||||||
|
if (!lpWlanSvcHandle)
|
||||||
|
{
|
||||||
|
return ERROR_INVALID_HANDLE;
|
||||||
|
}
|
||||||
|
|
||||||
|
RemoveEntryList(&lpWlanSvcHandle->WlanSvcHandleListEntry);
|
||||||
|
HeapFree(GetProcessHeap(), 0, lpWlanSvcHandle);
|
||||||
|
|
||||||
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD _RpcEnumInterfaces(
|
DWORD _RpcEnumInterfaces(
|
||||||
|
@ -120,6 +202,14 @@ DWORD _RpcGetInterfaceCapability(
|
||||||
const GUID *pInterfaceGuid,
|
const GUID *pInterfaceGuid,
|
||||||
PWLAN_INTERFACE_CAPABILITY *ppCapability)
|
PWLAN_INTERFACE_CAPABILITY *ppCapability)
|
||||||
{
|
{
|
||||||
|
PWLANSVCHANDLE lpWlanSvcHandle;
|
||||||
|
|
||||||
|
lpWlanSvcHandle = WlanSvcGetHandleEntry(hClientHandle);
|
||||||
|
if (!lpWlanSvcHandle)
|
||||||
|
{
|
||||||
|
return ERROR_INVALID_HANDLE;
|
||||||
|
}
|
||||||
|
|
||||||
UNIMPLEMENTED;
|
UNIMPLEMENTED;
|
||||||
return ERROR_CALL_NOT_IMPLEMENTED;
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
@ -167,6 +257,14 @@ DWORD _RpcScan(
|
||||||
PDOT11_SSID pDot11Ssid,
|
PDOT11_SSID pDot11Ssid,
|
||||||
PWLAN_RAW_DATA pIeData)
|
PWLAN_RAW_DATA pIeData)
|
||||||
{
|
{
|
||||||
|
PWLANSVCHANDLE lpWlanSvcHandle;
|
||||||
|
|
||||||
|
lpWlanSvcHandle = WlanSvcGetHandleEntry(hClientHandle);
|
||||||
|
if (!lpWlanSvcHandle)
|
||||||
|
{
|
||||||
|
return ERROR_INVALID_HANDLE;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
DWORD dwBytesReturned;
|
DWORD dwBytesReturned;
|
||||||
HANDLE hDevice;
|
HANDLE hDevice;
|
||||||
|
@ -284,7 +382,7 @@ DWORD _RpcGetProfile(
|
||||||
DWORD _RpcDeleteProfile(
|
DWORD _RpcDeleteProfile(
|
||||||
WLANSVC_RPC_HANDLE hClientHandle,
|
WLANSVC_RPC_HANDLE hClientHandle,
|
||||||
const GUID *pInterfaceGuid,
|
const GUID *pInterfaceGuid,
|
||||||
wchar_t *strProfileName)
|
const wchar_t *strProfileName)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
UNIMPLEMENTED;
|
||||||
return ERROR_CALL_NOT_IMPLEMENTED;
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
||||||
|
@ -293,8 +391,8 @@ DWORD _RpcDeleteProfile(
|
||||||
DWORD _RpcRenameProfile(
|
DWORD _RpcRenameProfile(
|
||||||
WLANSVC_RPC_HANDLE hClientHandle,
|
WLANSVC_RPC_HANDLE hClientHandle,
|
||||||
const GUID *pInterfaceGuid,
|
const GUID *pInterfaceGuid,
|
||||||
wchar_t *strOldProfileName,
|
const wchar_t *strOldProfileName,
|
||||||
wchar_t *strNewProfileName)
|
const wchar_t *strNewProfileName)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
UNIMPLEMENTED;
|
||||||
return ERROR_CALL_NOT_IMPLEMENTED;
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
||||||
|
@ -501,7 +599,7 @@ DWORD _RpcCancelPlap(
|
||||||
DWORD _RpcSetSecuritySettings(
|
DWORD _RpcSetSecuritySettings(
|
||||||
WLANSVC_RPC_HANDLE hClientHandle,
|
WLANSVC_RPC_HANDLE hClientHandle,
|
||||||
WLAN_SECURABLE_OBJECT SecurableObject,
|
WLAN_SECURABLE_OBJECT SecurableObject,
|
||||||
wchar_t *strModifiedSDDL)
|
const wchar_t *strModifiedSDDL)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
UNIMPLEMENTED;
|
||||||
return ERROR_CALL_NOT_IMPLEMENTED;
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
||||||
|
|
|
@ -21,34 +21,9 @@ SERVICE_STATUS_HANDLE ServiceStatusHandle;
|
||||||
SERVICE_STATUS SvcStatus;
|
SERVICE_STATUS SvcStatus;
|
||||||
static WCHAR ServiceName[] = L"WlanSvc";
|
static WCHAR ServiceName[] = L"WlanSvc";
|
||||||
|
|
||||||
|
DWORD WINAPI RpcThreadRoutine(LPVOID lpParameter);
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
static DWORD WINAPI RpcThreadRoutine(LPVOID lpParameter)
|
|
||||||
{
|
|
||||||
RPC_STATUS Status;
|
|
||||||
|
|
||||||
Status = RpcServerUseProtseqEpW(L"ncalrpc", 20, L"wlansvc", NULL);
|
|
||||||
if (Status != RPC_S_OK)
|
|
||||||
{
|
|
||||||
DPRINT("RpcServerUseProtseqEpW() failed (Status %lx)\n", Status);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
Status = RpcServerRegisterIf(wlansvc_interface_v1_0_s_ifspec, NULL, NULL);
|
|
||||||
if (Status != RPC_S_OK)
|
|
||||||
{
|
|
||||||
DPRINT("RpcServerRegisterIf() failed (Status %lx)\n", Status);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
Status = RpcServerListen(1, RPC_C_LISTEN_MAX_CALLS_DEFAULT, 0);
|
|
||||||
if (Status != RPC_S_OK)
|
|
||||||
{
|
|
||||||
DPRINT("RpcServerListen() failed (Status %lx)\n", Status);
|
|
||||||
}
|
|
||||||
|
|
||||||
DPRINT("RpcServerListen finished\n");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void UpdateServiceStatus(HANDLE hServiceStatus, DWORD NewStatus, DWORD Increment)
|
static void UpdateServiceStatus(HANDLE hServiceStatus, DWORD NewStatus, DWORD Increment)
|
||||||
{
|
{
|
||||||
|
|
|
@ -106,22 +106,22 @@ WlanConnect(IN HANDLE hClientHandle,
|
||||||
IN const PWLAN_CONNECTION_PARAMETERS pConnectionParameters,
|
IN const PWLAN_CONNECTION_PARAMETERS pConnectionParameters,
|
||||||
PVOID pReserved)
|
PVOID pReserved)
|
||||||
{
|
{
|
||||||
DWORD dwError = ERROR_SUCCESS;
|
DWORD dwResult = ERROR_SUCCESS;
|
||||||
|
|
||||||
if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL) || (pConnectionParameters == NULL))
|
if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL) || (pConnectionParameters == NULL))
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
RpcTryExcept
|
RpcTryExcept
|
||||||
{
|
{
|
||||||
_RpcConnect(hClientHandle, pInterfaceGuid, &pConnectionParameters);
|
dwResult = _RpcConnect(hClientHandle, pInterfaceGuid, &pConnectionParameters);
|
||||||
}
|
}
|
||||||
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
|
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
|
||||||
{
|
{
|
||||||
dwError = RpcExceptionCode();
|
dwResult = RpcExceptionCode();
|
||||||
}
|
}
|
||||||
RpcEndExcept;
|
RpcEndExcept;
|
||||||
|
|
||||||
return dwError;
|
return dwResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD
|
DWORD
|
||||||
|
@ -130,22 +130,22 @@ WlanDisconnect(IN HANDLE hClientHandle,
|
||||||
IN const GUID *pInterfaceGuid,
|
IN const GUID *pInterfaceGuid,
|
||||||
PVOID pReserved)
|
PVOID pReserved)
|
||||||
{
|
{
|
||||||
DWORD dwError = ERROR_SUCCESS;
|
DWORD dwResult = ERROR_SUCCESS;
|
||||||
|
|
||||||
if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL))
|
if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL))
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
RpcTryExcept
|
RpcTryExcept
|
||||||
{
|
{
|
||||||
_RpcDisconnect(hClientHandle, pInterfaceGuid);
|
dwResult = _RpcDisconnect(hClientHandle, pInterfaceGuid);
|
||||||
}
|
}
|
||||||
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
|
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
|
||||||
{
|
{
|
||||||
dwError = RpcExceptionCode();
|
dwResult = RpcExceptionCode();
|
||||||
}
|
}
|
||||||
RpcEndExcept;
|
RpcEndExcept;
|
||||||
|
|
||||||
return dwError;
|
return dwResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD
|
DWORD
|
||||||
|
@ -155,7 +155,7 @@ WlanOpenHandle(IN DWORD dwClientVersion,
|
||||||
OUT DWORD *pdwNegotiatedVersion,
|
OUT DWORD *pdwNegotiatedVersion,
|
||||||
OUT HANDLE *phClientHandle)
|
OUT HANDLE *phClientHandle)
|
||||||
{
|
{
|
||||||
DWORD dwError = ERROR_SUCCESS;
|
DWORD dwResult = ERROR_SUCCESS;
|
||||||
WCHAR szDummy[] = L"localhost";
|
WCHAR szDummy[] = L"localhost";
|
||||||
|
|
||||||
if ((pReserved != NULL) || (pdwNegotiatedVersion == NULL) || (phClientHandle == NULL))
|
if ((pReserved != NULL) || (pdwNegotiatedVersion == NULL) || (phClientHandle == NULL))
|
||||||
|
@ -163,18 +163,18 @@ WlanOpenHandle(IN DWORD dwClientVersion,
|
||||||
|
|
||||||
RpcTryExcept
|
RpcTryExcept
|
||||||
{
|
{
|
||||||
dwError = _RpcOpenHandle(szDummy,
|
dwResult = _RpcOpenHandle(szDummy,
|
||||||
dwClientVersion,
|
dwClientVersion,
|
||||||
pdwNegotiatedVersion,
|
pdwNegotiatedVersion,
|
||||||
(WLANSVC_RPC_HANDLE) phClientHandle);
|
(WLANSVC_RPC_HANDLE) phClientHandle);
|
||||||
}
|
}
|
||||||
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
|
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
|
||||||
{
|
{
|
||||||
dwError = RpcExceptionCode();
|
dwResult = RpcExceptionCode();
|
||||||
}
|
}
|
||||||
RpcEndExcept;
|
RpcEndExcept;
|
||||||
|
|
||||||
return dwError;
|
return dwResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD
|
DWORD
|
||||||
|
@ -182,22 +182,22 @@ WINAPI
|
||||||
WlanCloseHandle(IN HANDLE hClientHandle,
|
WlanCloseHandle(IN HANDLE hClientHandle,
|
||||||
PVOID pReserved)
|
PVOID pReserved)
|
||||||
{
|
{
|
||||||
DWORD dwError = ERROR_SUCCESS;
|
DWORD dwResult = ERROR_SUCCESS;
|
||||||
|
|
||||||
if ((pReserved != NULL) || (hClientHandle == NULL))
|
if ((pReserved != NULL) || (hClientHandle == NULL))
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
RpcTryExcept
|
RpcTryExcept
|
||||||
{
|
{
|
||||||
_RpcCloseHandle(hClientHandle);
|
dwResult = _RpcCloseHandle(&hClientHandle);
|
||||||
}
|
}
|
||||||
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
|
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
|
||||||
{
|
{
|
||||||
dwError = RpcExceptionCode();
|
dwResult = RpcExceptionCode();
|
||||||
}
|
}
|
||||||
RpcEndExcept;
|
RpcEndExcept;
|
||||||
|
|
||||||
return dwError;
|
return dwResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD
|
DWORD
|
||||||
|
@ -206,22 +206,22 @@ WlanEnumInterfaces(IN HANDLE hClientHandle,
|
||||||
PVOID pReserved,
|
PVOID pReserved,
|
||||||
OUT PWLAN_INTERFACE_INFO_LIST *ppInterfaceList)
|
OUT PWLAN_INTERFACE_INFO_LIST *ppInterfaceList)
|
||||||
{
|
{
|
||||||
DWORD dwError = ERROR_SUCCESS;
|
DWORD dwResult = ERROR_SUCCESS;
|
||||||
|
|
||||||
if ((pReserved != NULL) || (ppInterfaceList == NULL) || (hClientHandle == NULL))
|
if ((pReserved != NULL) || (ppInterfaceList == NULL) || (hClientHandle == NULL))
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
RpcTryExcept
|
RpcTryExcept
|
||||||
{
|
{
|
||||||
_RpcEnumInterfaces(hClientHandle, ppInterfaceList);
|
dwResult = _RpcEnumInterfaces(hClientHandle, ppInterfaceList);
|
||||||
}
|
}
|
||||||
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
|
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
|
||||||
{
|
{
|
||||||
dwError = RpcExceptionCode();
|
dwResult = RpcExceptionCode();
|
||||||
}
|
}
|
||||||
RpcEndExcept;
|
RpcEndExcept;
|
||||||
|
|
||||||
return dwError;
|
return dwResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD
|
DWORD
|
||||||
|
@ -232,22 +232,22 @@ WlanScan(IN HANDLE hClientHandle,
|
||||||
IN PWLAN_RAW_DATA pIeData,
|
IN PWLAN_RAW_DATA pIeData,
|
||||||
PVOID pReserved)
|
PVOID pReserved)
|
||||||
{
|
{
|
||||||
DWORD dwError = ERROR_SUCCESS;
|
DWORD dwResult = ERROR_SUCCESS;
|
||||||
|
|
||||||
if ((pReserved != NULL) || (pInterfaceGuid == NULL) || (hClientHandle == NULL))
|
if ((pReserved != NULL) || (pInterfaceGuid == NULL) || (hClientHandle == NULL))
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
RpcTryExcept
|
RpcTryExcept
|
||||||
{
|
{
|
||||||
_RpcScan(hClientHandle, pInterfaceGuid, pDot11Ssid, pIeData);
|
dwResult = _RpcScan(hClientHandle, pInterfaceGuid, pDot11Ssid, pIeData);
|
||||||
}
|
}
|
||||||
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
|
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
|
||||||
{
|
{
|
||||||
dwError = RpcExceptionCode();
|
dwResult = RpcExceptionCode();
|
||||||
}
|
}
|
||||||
RpcEndExcept;
|
RpcEndExcept;
|
||||||
|
|
||||||
return dwError;
|
return dwResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD
|
DWORD
|
||||||
|
@ -319,11 +319,22 @@ WlanSetSecuritySettings(IN HANDLE hClientHandle,
|
||||||
IN WLAN_SECURABLE_OBJECT SecurableObject,
|
IN WLAN_SECURABLE_OBJECT SecurableObject,
|
||||||
IN LPCWSTR strModifiedSDDL)
|
IN LPCWSTR strModifiedSDDL)
|
||||||
{
|
{
|
||||||
|
DWORD dwResult = ERROR_SUCCESS;
|
||||||
|
|
||||||
if ((hClientHandle == NULL) || (strModifiedSDDL == NULL) || (SecurableObject >= WLAN_SECURABLE_OBJECT_COUNT))
|
if ((hClientHandle == NULL) || (strModifiedSDDL == NULL) || (SecurableObject >= WLAN_SECURABLE_OBJECT_COUNT))
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
UNIMPLEMENTED;
|
RpcTryExcept
|
||||||
return ERROR_SUCCESS;
|
{
|
||||||
|
dwResult = _RpcSetSecuritySettings(hClientHandle, SecurableObject, strModifiedSDDL);
|
||||||
|
}
|
||||||
|
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
|
||||||
|
{
|
||||||
|
dwResult = RpcExceptionCode();
|
||||||
|
}
|
||||||
|
RpcEndExcept;
|
||||||
|
|
||||||
|
return dwResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD
|
DWORD
|
||||||
|
|
|
@ -39,11 +39,22 @@ WlanDeleteProfile(IN HANDLE hClientHandle,
|
||||||
IN LPCWSTR strProfileName,
|
IN LPCWSTR strProfileName,
|
||||||
PVOID pReserved)
|
PVOID pReserved)
|
||||||
{
|
{
|
||||||
|
DWORD dwResult = ERROR_SUCCESS;
|
||||||
|
|
||||||
if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL) || (strProfileName == NULL))
|
if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL) || (strProfileName == NULL))
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
UNIMPLEMENTED;
|
RpcTryExcept
|
||||||
return ERROR_SUCCESS;
|
{
|
||||||
|
dwResult = _RpcDeleteProfile(hClientHandle, pInterfaceGuid, strProfileName);
|
||||||
|
}
|
||||||
|
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
|
||||||
|
{
|
||||||
|
dwResult = RpcExceptionCode();
|
||||||
|
}
|
||||||
|
RpcEndExcept;
|
||||||
|
|
||||||
|
return dwResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD
|
DWORD
|
||||||
|
@ -54,11 +65,22 @@ WlanRenameProfile(IN HANDLE hClientHandle,
|
||||||
IN LPCWSTR strNewProfileName,
|
IN LPCWSTR strNewProfileName,
|
||||||
PVOID pReserved)
|
PVOID pReserved)
|
||||||
{
|
{
|
||||||
|
DWORD dwResult = ERROR_SUCCESS;
|
||||||
|
|
||||||
if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL) || (strOldProfileName == NULL) || (strNewProfileName == NULL))
|
if ((pReserved != NULL) || (hClientHandle == NULL) || (pInterfaceGuid == NULL) || (strOldProfileName == NULL) || (strNewProfileName == NULL))
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
UNIMPLEMENTED;
|
RpcTryExcept
|
||||||
return ERROR_SUCCESS;
|
{
|
||||||
|
dwResult = _RpcRenameProfile(hClientHandle, pInterfaceGuid, strOldProfileName, strNewProfileName);
|
||||||
|
}
|
||||||
|
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
|
||||||
|
{
|
||||||
|
dwResult = RpcExceptionCode();
|
||||||
|
}
|
||||||
|
RpcEndExcept;
|
||||||
|
|
||||||
|
return dwResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD
|
DWORD
|
||||||
|
|
|
@ -10,6 +10,9 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Defines */
|
/* Defines */
|
||||||
|
#define WLAN_API_VERSION_1_0 0x00000001
|
||||||
|
#define WLAN_API_VERSION_2_0 0x00000002
|
||||||
|
|
||||||
#define WLAN_MAX_PHY_INDEX 64
|
#define WLAN_MAX_PHY_INDEX 64
|
||||||
#define WLAN_MAX_NAME_LENGTH 256
|
#define WLAN_MAX_NAME_LENGTH 256
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#include <wlanapi.h>
|
#include <wlanapi.h>
|
||||||
|
|
||||||
typedef [context_handle] PVOID WLANSVC_RPC_HANDLE;
|
typedef [context_handle] PVOID WLANSVC_RPC_HANDLE;
|
||||||
typedef WLANSVC_RPC_HANDLE* LPWLANSVC_RPC_HANDLE;
|
typedef WLANSVC_RPC_HANDLE *LPWLANSVC_RPC_HANDLE;
|
||||||
typedef [handle, string] LPWSTR WLANSVC_HANDLE;
|
typedef [handle, string] LPWSTR WLANSVC_HANDLE;
|
||||||
|
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
|
@ -39,8 +39,12 @@ typedef struct struct_E {
|
||||||
} struct_E ;
|
} struct_E ;
|
||||||
|
|
||||||
[
|
[
|
||||||
uuid(266f33b4-c7c1-4bd1-8f52-ddb8f2214ea9),
|
uuid(266f33b4-c7c1-4bd1-8f52-ddb8f2214ea9),
|
||||||
version(1.0)
|
version(1.0),
|
||||||
|
pointer_default(unique)
|
||||||
|
#ifndef __midl
|
||||||
|
,explicit_handle
|
||||||
|
#endif
|
||||||
]
|
]
|
||||||
|
|
||||||
interface wlansvc_interface
|
interface wlansvc_interface
|
||||||
|
@ -50,11 +54,11 @@ interface wlansvc_interface
|
||||||
[in] WLANSVC_HANDLE szMachineName,
|
[in] WLANSVC_HANDLE szMachineName,
|
||||||
[in] DWORD dwClientVersion,
|
[in] DWORD dwClientVersion,
|
||||||
[out] DWORD* pdwNegotiatedVersion,
|
[out] DWORD* pdwNegotiatedVersion,
|
||||||
[out] LPWLANSVC_RPC_HANDLE phClientHandle);
|
[out] WLANSVC_RPC_HANDLE *phClientHandle);
|
||||||
|
|
||||||
/* Function: 0x01 */
|
/* Function: 0x01 */
|
||||||
DWORD _RpcCloseHandle(
|
DWORD _RpcCloseHandle(
|
||||||
[in, out] LPWLANSVC_RPC_HANDLE phClientHandle);
|
[in, out] WLANSVC_RPC_HANDLE *phClientHandle);
|
||||||
|
|
||||||
/* Function: 0x02 */
|
/* Function: 0x02 */
|
||||||
DWORD _RpcEnumInterfaces(
|
DWORD _RpcEnumInterfaces(
|
||||||
|
@ -189,14 +193,14 @@ interface wlansvc_interface
|
||||||
DWORD _RpcDeleteProfile(
|
DWORD _RpcDeleteProfile(
|
||||||
[in] WLANSVC_RPC_HANDLE hClientHandle,
|
[in] WLANSVC_RPC_HANDLE hClientHandle,
|
||||||
[in] const GUID* pInterfaceGuid,
|
[in] const GUID* pInterfaceGuid,
|
||||||
[in][string] wchar_t * strProfileName);
|
[in][string] const wchar_t * strProfileName);
|
||||||
|
|
||||||
/* Function: 0x14 */
|
/* Function: 0x14 */
|
||||||
DWORD _RpcRenameProfile(
|
DWORD _RpcRenameProfile(
|
||||||
[in] WLANSVC_RPC_HANDLE hClientHandle,
|
[in] WLANSVC_RPC_HANDLE hClientHandle,
|
||||||
[in] const GUID* pInterfaceGuid,
|
[in] const GUID* pInterfaceGuid,
|
||||||
[in][string] wchar_t * strOldProfileName,
|
[in][string] const wchar_t * strOldProfileName,
|
||||||
[in][string] wchar_t * strNewProfileName);
|
[in][string] const wchar_t * strNewProfileName);
|
||||||
|
|
||||||
/* Function: 0x15 */
|
/* Function: 0x15 */
|
||||||
DWORD _RpcSetProfileList(
|
DWORD _RpcSetProfileList(
|
||||||
|
@ -262,35 +266,35 @@ interface wlansvc_interface
|
||||||
[in] DWORD dwFlags,
|
[in] DWORD dwFlags,
|
||||||
[in] BOOL bOverWrite);
|
[in] BOOL bOverWrite);
|
||||||
|
|
||||||
/* Function: 0x1E, address: 0x2C992E36 */
|
/* Function: 0x1E */
|
||||||
DWORD _RpcIsUIRequestPending(
|
DWORD _RpcIsUIRequestPending(
|
||||||
[in] wchar_t * arg_1,
|
[in] WLANSVC_HANDLE arg_1,
|
||||||
[in] const GUID* pInterfaceGuid,
|
[in] const GUID* pInterfaceGuid,
|
||||||
[in] struct_C * arg_3,
|
[in] struct_C * arg_3,
|
||||||
[out] LPDWORD arg_4);
|
[out] LPDWORD arg_4);
|
||||||
|
|
||||||
/* Function: 0x1F, address: 0x2C992EB3 */
|
/* Function: 0x1F */
|
||||||
DWORD _RpcSetUIForwardingNetworkList(
|
DWORD _RpcSetUIForwardingNetworkList(
|
||||||
[in] wchar_t * arg_1,
|
[in] WLANSVC_HANDLE arg_1,
|
||||||
[in][size_is(dwSize)] GUID* arg_2,
|
[in][size_is(dwSize)] GUID* arg_2,
|
||||||
[in] DWORD dwSize,
|
[in] DWORD dwSize,
|
||||||
[out] GUID* arg_4);
|
[out] GUID* arg_4);
|
||||||
|
|
||||||
/* Function: 0x20 */
|
/* Function: 0x20 */
|
||||||
DWORD _RpcIsNetworkSuppressed(
|
DWORD _RpcIsNetworkSuppressed(
|
||||||
[in] wchar_t * arg_1,
|
[in] WLANSVC_HANDLE arg_1,
|
||||||
[in] DWORD arg_2,
|
[in] DWORD arg_2,
|
||||||
[in] const GUID* pInterfaceGuid,
|
[in] const GUID* pInterfaceGuid,
|
||||||
[out] LPDWORD arg_4);
|
[out] LPDWORD arg_4);
|
||||||
|
|
||||||
/* Function: 0x21 */
|
/* Function: 0x21 */
|
||||||
DWORD _RpcRemoveUIForwardingNetworkList(
|
DWORD _RpcRemoveUIForwardingNetworkList(
|
||||||
[in] wchar_t * arg_1,
|
[in] WLANSVC_HANDLE arg_1,
|
||||||
[in] const GUID* pInterfaceGuid);
|
[in] const GUID* pInterfaceGuid);
|
||||||
|
|
||||||
/* Function: 0x22 */
|
/* Function: 0x22 */
|
||||||
DWORD _RpcQueryExtUIRequest(
|
DWORD _RpcQueryExtUIRequest(
|
||||||
[in] wchar_t * arg_1,
|
[in] WLANSVC_HANDLE arg_1,
|
||||||
[in] GUID* arg_2,
|
[in] GUID* arg_2,
|
||||||
[in] GUID* arg_3,
|
[in] GUID* arg_3,
|
||||||
[in] /* enum16 */ short arg_4,
|
[in] /* enum16 */ short arg_4,
|
||||||
|
@ -299,13 +303,13 @@ interface wlansvc_interface
|
||||||
|
|
||||||
/* Function: 0x23 */
|
/* Function: 0x23 */
|
||||||
DWORD _RpcUIResponse(
|
DWORD _RpcUIResponse(
|
||||||
[in] wchar_t * arg_1,
|
[in] WLANSVC_HANDLE arg_1,
|
||||||
[in] struct_C * arg_2,
|
[in] struct_C * arg_2,
|
||||||
[in] struct_D * arg_3);
|
[in] struct_D * arg_3);
|
||||||
|
|
||||||
/* Function: 0x24 */
|
/* Function: 0x24 */
|
||||||
DWORD _RpcGetProfileKeyInfo(
|
DWORD _RpcGetProfileKeyInfo(
|
||||||
[in] wchar_t * arg_1,
|
[in] WLANSVC_HANDLE arg_1,
|
||||||
[in] DWORD arg_2,
|
[in] DWORD arg_2,
|
||||||
[in] const GUID* pInterfaceGuid,
|
[in] const GUID* pInterfaceGuid,
|
||||||
[in][string] wchar_t * arg_4,
|
[in][string] wchar_t * arg_4,
|
||||||
|
@ -316,7 +320,7 @@ interface wlansvc_interface
|
||||||
|
|
||||||
/* Function: 0x25 */
|
/* Function: 0x25 */
|
||||||
DWORD _RpcAsyncDoPlap(
|
DWORD _RpcAsyncDoPlap(
|
||||||
[in] wchar_t * arg_1,
|
[in] WLANSVC_HANDLE arg_1,
|
||||||
[in] const GUID* pInterfaceGuid,
|
[in] const GUID* pInterfaceGuid,
|
||||||
[in][string] wchar_t * arg_3,
|
[in][string] wchar_t * arg_3,
|
||||||
[in] DWORD dwSize,
|
[in] DWORD dwSize,
|
||||||
|
@ -324,7 +328,7 @@ interface wlansvc_interface
|
||||||
|
|
||||||
/* Function: 0x26 */
|
/* Function: 0x26 */
|
||||||
DWORD _RpcQueryPlapCredentials(
|
DWORD _RpcQueryPlapCredentials(
|
||||||
[in] wchar_t * arg_1,
|
[in] WLANSVC_HANDLE arg_1,
|
||||||
[in, out] LPDWORD dwSize,
|
[in, out] LPDWORD dwSize,
|
||||||
[out][ref][size_is(*dwSize)] struct_E ** arg_3,
|
[out][ref][size_is(*dwSize)] struct_E ** arg_3,
|
||||||
[out][ref][string] wchar_t ** arg_4,
|
[out][ref][string] wchar_t ** arg_4,
|
||||||
|
@ -336,14 +340,14 @@ interface wlansvc_interface
|
||||||
|
|
||||||
/* Function: 0x27 */
|
/* Function: 0x27 */
|
||||||
DWORD _RpcCancelPlap(
|
DWORD _RpcCancelPlap(
|
||||||
[in] wchar_t * arg_1,
|
[in] WLANSVC_HANDLE arg_1,
|
||||||
[in] const GUID* pInterfaceGuid);
|
[in] const GUID* pInterfaceGuid);
|
||||||
|
|
||||||
/* Function: 0x28 */
|
/* Function: 0x28 */
|
||||||
DWORD _RpcSetSecuritySettings(
|
DWORD _RpcSetSecuritySettings(
|
||||||
[in] WLANSVC_RPC_HANDLE hClientHandle,
|
[in] WLANSVC_RPC_HANDLE hClientHandle,
|
||||||
[in] WLAN_SECURABLE_OBJECT SecurableObject,
|
[in] WLAN_SECURABLE_OBJECT SecurableObject,
|
||||||
[in][string] wchar_t * strModifiedSDDL);
|
[in][string] const wchar_t * strModifiedSDDL);
|
||||||
|
|
||||||
/* Function: 0x29 */
|
/* Function: 0x29 */
|
||||||
DWORD _RpcGetSecuritySettings(
|
DWORD _RpcGetSecuritySettings(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue