ReactOS 0.4.15-dev-7674-gc0b4db1
rpc.c
Go to the documentation of this file.
1/*
2 * RPC support routines
3 *
4 * Copyright 2005 Eric Kohl
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 St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#include "setupapi_private.h"
22
25
26
30{
31 PWSTR pszStringBinding = NULL;
33
35 L"ncacn_np",
36 (LPWSTR)pszMachine,
37 L"\\pipe\\plugplay",
38 NULL,
39 &pszStringBinding);
40 if (Status != RPC_S_OK)
41 return Status;
42
43 Status = RpcBindingFromStringBindingW(pszStringBinding,
45
46 RpcStringFreeW(&pszStringBinding);
47
48 return Status;
49}
50
51
54{
55 if (BindingHandle != NULL)
56 {
59 }
60
61 return RPC_S_OK;
62}
63
64
65BOOL
67 HSTRING_TABLE *StringTable)
68{
70 {
71 if (BindingHandle != NULL)
73
74 if (StringTable != NULL)
75 *StringTable = LocalStringTable;
76
77 return TRUE;
78 }
79
82 return FALSE;
83
85 {
87 return FALSE;
88 }
89
91
92 if (BindingHandle != NULL)
94
95 if (StringTable != NULL)
96 *StringTable = LocalStringTable;
97
98 return TRUE;
99}
100
101
104{
108}
109
110
113{
115}
116
117
118void __RPC_USER
120{
122}
123
124/* EOF */
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
RPC_STATUS PnpBindRpc(LPCWSTR pszMachine, RPC_BINDING_HANDLE *BindingHandle)
Definition: rpc.c:28
BOOL PnpGetLocalHandles(RPC_BINDING_HANDLE *BindingHandle, HSTRING_TABLE *StringTable)
Definition: rpc.c:66
RPC_STATUS PnpUnbindRpc(RPC_BINDING_HANDLE *BindingHandle)
Definition: rpc.c:53
static RPC_BINDING_HANDLE LocalBindingHandle
Definition: rpc.c:23
static HSTRING_TABLE LocalStringTable
Definition: rpc.c:24
RPC_STATUS PnpUnbindLocalBindingHandle(VOID)
Definition: rpc.c:103
HSTRING_TABLE WINAPI pSetupStringTableInitialize(VOID)
Definition: stringtable.c:54
DWORD WINAPI pSetupStringTableAddString(HSTRING_TABLE hStringTable, LPWSTR lpString, DWORD dwFlags)
Definition: stringtable.c:196
VOID WINAPI pSetupStringTableDestroy(HSTRING_TABLE hStringTable)
Definition: stringtable.c:145
unsigned int BOOL
Definition: ntddk_ex.h:94
Status
Definition: gdiplustypes.h:25
GLenum GLsizei len
Definition: glext.h:6722
static PVOID ptr
Definition: dispmode.c:27
#define L(x)
Definition: ntvdm.h:50
RPC_STATUS WINAPI RpcBindingFromStringBindingW(RPC_WSTR StringBinding, RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:880
RPC_STATUS WINAPI RpcStringBindingComposeW(RPC_WSTR ObjUuid, RPC_WSTR Protseq, RPC_WSTR NetworkAddr, RPC_WSTR Endpoint, RPC_WSTR Options, RPC_WSTR *StringBinding)
Definition: rpc_binding.c:510
RPC_STATUS WINAPI RpcBindingFree(RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:787
#define RPC_S_OK
Definition: rpcnterr.h:22
RPC_STATUS WINAPI RpcStringFreeW(RPC_WSTR *String)
Definition: rpcrt4_main.c:175
#define midl_user_free
Definition: rpc.h:45
#define __RPC_FAR
Definition: rpc.h:56
long RPC_STATUS
Definition: rpc.h:52
#define __RPC_USER
Definition: rpc.h:65
#define midl_user_allocate
Definition: rpc.h:44
_In_ ULONG _Out_ HANDLE * BindingHandle
Definition: tdikrnl.h:1147
uint16_t * PWSTR
Definition: typedefs.h:56
ULONG_PTR SIZE_T
Definition: typedefs.h:80
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185