ReactOS
0.4.16-dev-297-gc569aee
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
_
c
d
e
f
g
h
i
l
n
o
p
s
t
u
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
_
c
d
f
i
l
m
o
p
s
t
w
x
Enumerator
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
x
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
winreg.c
Go to the documentation of this file.
1
/*
2
* COPYRIGHT: See COPYING in the top level directory
3
* PROJECT: ReactOS system libraries
4
* FILE: lib/advapi32/service/winreg.c
5
* PURPOSE: Remote registry functions
6
* PROGRAMMER: Eric Kohl
7
*/
8
9
/* INCLUDES ******************************************************************/
10
11
#include <
advapi32.h
>
12
WINE_DEFAULT_DEBUG_CHANNEL
(advapi);
13
14
15
/* FUNCTIONS *****************************************************************/
16
17
18
handle_t
__RPC_USER
19
PREGISTRY_SERVER_NAME_bind
(
PREGISTRY_SERVER_NAME
pszServerName)
20
{
21
handle_t
hBinding
=
NULL
;
22
LPWSTR
pszStringBinding;
23
RPC_STATUS
status
;
24
25
TRACE
(
"PREGISTRY_SERVER_NAME_bind() called\n"
);
26
27
status
=
RpcStringBindingComposeW
(
NULL
,
28
L
"ncacn_np"
,
29
pszServerName,
30
L
"\\pipe\\winreg"
,
31
NULL
,
32
&pszStringBinding);
33
if
(
status
!=
RPC_S_OK
)
34
{
35
ERR
(
"RpcStringBindingCompose returned 0x%x\n"
,
status
);
36
return
NULL
;
37
}
38
39
/* Set the binding handle that will be used to bind to the server. */
40
status
=
RpcBindingFromStringBindingW
(pszStringBinding,
41
&
hBinding
);
42
if
(
status
!=
RPC_S_OK
)
43
{
44
ERR
(
"RpcBindingFromStringBinding returned 0x%x\n"
,
status
);
45
}
46
47
status
=
RpcStringFreeW
(&pszStringBinding);
48
if
(
status
!=
RPC_S_OK
)
49
{
50
ERR
(
"RpcStringFree returned 0x%x\n"
,
status
);
51
}
52
53
return
hBinding
;
54
}
55
56
57
void
__RPC_USER
58
PREGISTRY_SERVER_NAME_unbind
(
PREGISTRY_SERVER_NAME
pszServerName,
59
handle_t
hBinding
)
60
{
61
RPC_STATUS
status
;
62
63
TRACE
(
"PREGISTRY_SERVER_NAME_unbind() called\n"
);
64
65
status
=
RpcBindingFree
(&
hBinding
);
66
if
(
status
!=
RPC_S_OK
)
67
{
68
ERR
(
"RpcBindingFree returned 0x%x\n"
,
status
);
69
}
70
}
71
72
/* EOF */
advapi32.h
WINE_DEFAULT_DEBUG_CHANNEL
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition:
precomp.h:23
ERR
#define ERR(fmt,...)
Definition:
precomp.h:57
hBinding
handle_t hBinding
Definition:
ctx_c.c:54
NULL
#define NULL
Definition:
types.h:112
void
Definition:
nsiface.idl:2307
L
#define L(x)
Definition:
ntvdm.h:50
RpcBindingFromStringBindingW
RPC_STATUS WINAPI RpcBindingFromStringBindingW(RPC_WSTR StringBinding, RPC_BINDING_HANDLE *Binding)
Definition:
rpc_binding.c:880
RpcStringBindingComposeW
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
RpcBindingFree
RPC_STATUS WINAPI RpcBindingFree(RPC_BINDING_HANDLE *Binding)
Definition:
rpc_binding.c:787
RPC_S_OK
#define RPC_S_OK
Definition:
rpcnterr.h:22
RpcStringFreeW
RPC_STATUS WINAPI RpcStringFreeW(RPC_WSTR *String)
Definition:
rpcrt4_main.c:175
RPC_STATUS
long RPC_STATUS
Definition:
rpc.h:52
__RPC_USER
#define __RPC_USER
Definition:
rpc.h:65
TRACE
#define TRACE(s)
Definition:
solgame.cpp:4
status
Definition:
ps.c:97
PREGISTRY_SERVER_NAME_bind
handle_t __RPC_USER PREGISTRY_SERVER_NAME_bind(PREGISTRY_SERVER_NAME pszServerName)
Definition:
winreg.c:19
PREGISTRY_SERVER_NAME_unbind
void __RPC_USER PREGISTRY_SERVER_NAME_unbind(PREGISTRY_SERVER_NAME pszServerName, handle_t hBinding)
Definition:
winreg.c:58
PREGISTRY_SERVER_NAME
PWCHAR PREGISTRY_SERVER_NAME
Definition:
winreg.idl:10
LPWSTR
WCHAR * LPWSTR
Definition:
xmlstorage.h:184
dll
win32
advapi32
service
winreg.c
Generated on Tue Nov 26 2024 06:03:33 for ReactOS by
1.9.6