use ncalrpc instead of a named pipe

svn path=/trunk/; revision=40134
This commit is contained in:
Christoph von Wittich 2009-03-20 13:44:06 +00:00
parent 893ccc059d
commit 59ceaaac16

View file

@ -20,6 +20,7 @@
/* INCLUDES ****************************************************************/
#define WIN32_NO_STATUS
#include <windows.h>
#include "wlansvc_c.h"
@ -37,9 +38,9 @@ WLANSVC_HANDLE_bind(WLANSVC_HANDLE szMachineName)
TRACE("RPC_SERVICE_STATUS_HANDLE_bind() called\n");
Status = RpcStringBindingComposeW(NULL,
L"ncacn_np",
L"ncalrpc",
szMachineName,
L"\\pipe\\trkwks",
L"wlansvc",
NULL,
&pszStringBinding);
if (Status != RPC_S_OK)
@ -102,13 +103,14 @@ WlanOpenHandle(IN DWORD dwClientVersion,
OUT HANDLE *phClientHandle)
{
DWORD dwError = ERROR_SUCCESS;
WCHAR szDummy[] = L"localhost";
if ((pReserved != NULL) || (pdwNegotiatedVersion == NULL) || (phClientHandle == NULL))
return ERROR_INVALID_PARAMETER;
RpcTryExcept
{
dwError = _RpcOpenHandle(NULL,
dwError = _RpcOpenHandle(szDummy,
dwClientVersion,
pdwNegotiatedVersion,
(WLANSVC_RPC_HANDLE) phClientHandle);