[ros-diffs] [cwittich] 40060: -add wlan service to registry -add wlansvc and wlapapi_winetest to bootcd -add some parameter checks to WlanCloseHandle -halfplement WlanOpenHandle

cwittich at svn.reactos.org cwittich at svn.reactos.org
Mon Mar 16 14:40:26 CET 2009


Author: cwittich
Date: Mon Mar 16 16:40:25 2009
New Revision: 40060

URL: http://svn.reactos.org/svn/reactos?rev=40060&view=rev
Log:
-add wlan service to registry
-add wlansvc and wlapapi_winetest to bootcd
-add some parameter checks to WlanCloseHandle
-halfplement WlanOpenHandle

Modified:
    trunk/reactos/boot/bootdata/hivesys_i386.inf
    trunk/reactos/boot/bootdata/packages/reactos.dff
    trunk/reactos/dll/win32/wlanapi/main.c
    trunk/reactos/dll/win32/wlanapi/wlanapi.rbuild
    trunk/reactos/dll/win32/wlanapi/wlanapi.spec
    trunk/reactos/include/reactos/idl/wlansvc.idl

Modified: trunk/reactos/boot/bootdata/hivesys_i386.inf
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivesys_i386.inf?rev=40060&r1=40059&r2=40060&view=diff
==============================================================================
--- trunk/reactos/boot/bootdata/hivesys_i386.inf [iso-8859-1] (original)
+++ trunk/reactos/boot/bootdata/hivesys_i386.inf [iso-8859-1] Mon Mar 16 16:40:25 2009
@@ -1041,6 +1041,17 @@
 HKLM,"SYSTEM\CurrentControlSet\Services\Spooler","Start",0x00010001,0x00000002
 HKLM,"SYSTEM\CurrentControlSet\Services\Spooler","Type",0x00010001,0x00000110
 
+; WLAN service
+HKLM,"SYSTEM\CurrentControlSet\Services\WlanSvc","DependOnService",0x00010000,"RPCSS"
+HKLM,"SYSTEM\CurrentControlSet\Services\WlanSvc","DisplayName",0x00000000,"WLAN Service"
+HKLM,"SYSTEM\CurrentControlSet\Services\WlanSvc","Description",0x00000000,"WLAN Service"
+HKLM,"SYSTEM\CurrentControlSet\Services\WlanSvc","ErrorControl",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\WlanSvc","Group",0x00000000,"TDI"
+HKLM,"SYSTEM\CurrentControlSet\Services\WlanSvc","ImagePath",0x00020000,"%SystemRoot%\system32\wlansvc.exe"
+HKLM,"SYSTEM\CurrentControlSet\Services\WlanSvc","ObjectName",0x00000000,"LocalSystem"
+HKLM,"SYSTEM\CurrentControlSet\Services\WlanSvc","Start",0x00010001,0x00000003
+HKLM,"SYSTEM\CurrentControlSet\Services\WlanSvc","Type",0x00010001,0x00000110
+
 ; Simple TCP services
 HKLM,"SYSTEM\CurrentControlSet\Services\tcpsvcs","Description",0x00000000,"Supports the following TCP/IP services: Chargen, Daytime, Discard, Echo, QOTD"
 HKLM,"SYSTEM\CurrentControlSet\Services\tcpsvcs","DisplayName",0x00000000,"Simple TCP/IP Services"

Modified: trunk/reactos/boot/bootdata/packages/reactos.dff
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/packages/reactos.dff?rev=40060&r1=40059&r2=40060&view=diff
==============================================================================
--- trunk/reactos/boot/bootdata/packages/reactos.dff [iso-8859-1] (original)
+++ trunk/reactos/boot/bootdata/packages/reactos.dff [iso-8859-1] Mon Mar 16 16:40:25 2009
@@ -86,6 +86,7 @@
 base\services\tcpsvcs\tcpsvcs.exe                   1
 base\services\tcpsvcs\quotes                        5
 base\services\umpnpmgr\umpnpmgr.exe                 1
+base\services\wlansvc\wlansvc.exe                   1
 
 base\setup\setup\setup.exe                          1
 base\setup\vmwinst\vmwinst.exe                      1
@@ -746,6 +747,7 @@
 modules\rostests\winetests\winhttp\winhttp_winetest.exe                    7   optional
 modules\rostests\winetests\wininet\wininet_winetest.exe                    7   optional
 modules\rostests\winetests\wintrust\wintrust_winetest.exe                  7   optional
+modules\rostests\winetests\wlanapi\wlanapi_winetest.exe                    7   optional
 modules\rostests\winetests\ws2_32\ws2_32_winetest.exe                      7   optional
 
 modules\wallpaper\Angelus_02_ROSWP.bmp                                     4   optional

Modified: trunk/reactos/dll/win32/wlanapi/main.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wlanapi/main.c?rev=40060&r1=40059&r2=40060&view=diff
==============================================================================
--- trunk/reactos/dll/win32/wlanapi/main.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wlanapi/main.c [iso-8859-1] Mon Mar 16 16:40:25 2009
@@ -23,8 +23,62 @@
 #include <windows.h>
 #include "wlansvc_c.h"
 
-#define NDEBUG
-#include <debug.h>
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(wlanapi);
+
+handle_t __RPC_USER
+WLANSVC_HANDLE_bind(WLANSVC_HANDLE szMachineName)
+{
+    handle_t hBinding = NULL;
+    LPWSTR pszStringBinding;
+    RPC_STATUS Status;
+
+    TRACE("RPC_SERVICE_STATUS_HANDLE_bind() called\n");
+
+    Status = RpcStringBindingComposeW(NULL,
+                                      L"ncacn_np",
+                                      szMachineName,
+                                      L"\\pipe\\trkwks",
+                                      NULL,
+                                      &pszStringBinding);
+    if (Status != RPC_S_OK)
+    {
+        ERR("RpcStringBindingCompose returned 0x%x\n", Status);
+        return NULL;
+    }
+
+    /* Set the binding handle that will be used to bind to the server. */
+    Status = RpcBindingFromStringBindingW(pszStringBinding,
+                                          &hBinding);
+    if (Status != RPC_S_OK)
+    {
+        ERR("RpcBindingFromStringBinding returned 0x%x\n", Status);
+    }
+
+    Status = RpcStringFreeW(&pszStringBinding);
+    if (Status != RPC_S_OK)
+    {
+        ERR("RpcStringFree returned 0x%x\n", Status);
+    }
+
+    return hBinding;
+}
+
+void __RPC_USER
+WLANSVC_HANDLE_unbind(WLANSVC_HANDLE szMachineName,
+                                 handle_t hBinding)
+{
+    RPC_STATUS Status;
+
+    TRACE("WLANSVC_HANDLE_unbind() called\n");
+
+    Status = RpcBindingFree(&hBinding);
+    if (Status != RPC_S_OK)
+    {
+        ERR("RpcBindingFree returned 0x%x\n", Status);
+    }
+}
 
 PVOID
 WINAPI
@@ -38,6 +92,34 @@
 WlanFreeMemory(IN PVOID pMem)
 {
     HeapFree(GetProcessHeap(), 0, pMem);
+}
+
+DWORD
+WINAPI
+WlanOpenHandle(IN DWORD dwClientVersion,
+               PVOID pReserved,
+               OUT DWORD *pdwNegotiatedVersion,
+               OUT HANDLE *phClientHandle)
+{
+    DWORD dwError = ERROR_SUCCESS;
+
+    if ((pReserved != NULL) || (pdwNegotiatedVersion == NULL) || (phClientHandle == NULL))
+        return ERROR_INVALID_PARAMETER;
+
+    RpcTryExcept
+    {
+        dwError = _RpcOpenHandle(NULL,
+                                dwClientVersion,
+                                pdwNegotiatedVersion,
+                                (WLANSVC_RPC_HANDLE) phClientHandle);
+    }
+    RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+    {
+        dwError = RpcExceptionCode();
+    }
+    RpcEndExcept;
+
+    return dwError;
 }
 
 DWORD
@@ -46,6 +128,9 @@
                 PVOID pReserved)
 {
     DWORD dwError = ERROR_SUCCESS;
+
+    if ((pReserved != NULL) || (hClientHandle == NULL))
+        return ERROR_INVALID_PARAMETER;
 
     RpcTryExcept
     {

Modified: trunk/reactos/dll/win32/wlanapi/wlanapi.rbuild
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wlanapi/wlanapi.rbuild?rev=40060&r1=40059&r2=40060&view=diff
==============================================================================
--- trunk/reactos/dll/win32/wlanapi/wlanapi.rbuild [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wlanapi/wlanapi.rbuild [iso-8859-1] Mon Mar 16 16:40:25 2009
@@ -3,6 +3,7 @@
 	<include base="wlanapi">.</include>
 	<include base="wlansvc_client">.</include>
 	<library>wlansvc_client</library>
+	<library>wine</library>
 	<library>kernel32</library>
 	<library>rpcrt4</library>
 	<library>pseh</library>

Modified: trunk/reactos/dll/win32/wlanapi/wlanapi.spec
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wlanapi/wlanapi.spec?rev=40060&r1=40059&r2=40060&view=diff
==============================================================================
--- trunk/reactos/dll/win32/wlanapi/wlanapi.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wlanapi/wlanapi.spec [iso-8859-1] Mon Mar 16 16:40:25 2009
@@ -15,7 +15,7 @@
 @ stub WlanGetProfileList
 @ stub WlanGetSecuritySettings
 @ stub WlanIhvControl
-@ stub WlanOpenHandle
+@ stdcall WlanOpenHandle (long ptr ptr ptr)
 @ stub WlanQueryAutoConfigParameter
 @ stub WlanQueryInterface
 @ stub WlanReasonCodeToString

Modified: trunk/reactos/include/reactos/idl/wlansvc.idl
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/idl/wlansvc.idl?rev=40060&r1=40059&r2=40060&view=diff
==============================================================================
--- trunk/reactos/include/reactos/idl/wlansvc.idl [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/idl/wlansvc.idl [iso-8859-1] Mon Mar 16 16:40:25 2009
@@ -7,6 +7,7 @@
 
 typedef [context_handle] PVOID WLANSVC_RPC_HANDLE;
 typedef WLANSVC_RPC_HANDLE* LPWLANSVC_RPC_HANDLE;
+typedef [handle] LPWSTR WLANSVC_HANDLE;
 
 /* FIXME */
 typedef struct struct_C {
@@ -46,7 +47,7 @@
 {
     /* Function: 0x00 */
     DWORD _RpcOpenHandle(
-        [in] wchar_t * arg_1,
+        [in] WLANSVC_HANDLE szMachineName,
         [in] DWORD dwClientVersion,
         [in, out] DWORD* pdwNegotiatedVersion,
         [in, out] LPWLANSVC_RPC_HANDLE phClientHandle);



More information about the Ros-diffs mailing list