ReactOS  0.4.13-dev-259-g5ca9c9c
winreg.c File Reference
#include <advapi32.h>
Include dependency graph for winreg.c:

Go to the source code of this file.

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (advapi)
 
handle_t __RPC_USER PREGISTRY_SERVER_NAME_bind (PREGISTRY_SERVER_NAME pszServerName)
 
void __RPC_USER PREGISTRY_SERVER_NAME_unbind (PREGISTRY_SERVER_NAME pszServerName, handle_t hBinding)
 

Function Documentation

◆ PREGISTRY_SERVER_NAME_bind()

handle_t __RPC_USER PREGISTRY_SERVER_NAME_bind ( PREGISTRY_SERVER_NAME  pszServerName)

Definition at line 19 of file winreg.c.

20 {
22  LPWSTR pszStringBinding;
24 
25  TRACE("PREGISTRY_SERVER_NAME_bind() called\n");
26 
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 }
RPC_STATUS WINAPI RpcBindingFromStringBindingW(RPC_WSTR StringBinding, RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:877
handle_t hBinding
Definition: ctx_c.c:54
RPC_STATUS WINAPI RpcStringFreeW(RPC_WSTR *String)
Definition: rpcrt4_main.c:177
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:511
long RPC_STATUS
Definition: rpc.h:52
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
static const WCHAR L[]
Definition: oid.c:1250
#define ERR(fmt,...)
Definition: debug.h:109
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static SERVICE_STATUS status
Definition: service.c:31
#define RPC_S_OK
Definition: rpcnterr.h:22
Definition: ps.c:97

◆ PREGISTRY_SERVER_NAME_unbind()

void __RPC_USER PREGISTRY_SERVER_NAME_unbind ( PREGISTRY_SERVER_NAME  pszServerName,
handle_t  hBinding 
)

Definition at line 58 of file winreg.c.

60 {
62 
63  TRACE("PREGISTRY_SERVER_NAME_unbind() called\n");
64 
66  if (status != RPC_S_OK)
67  {
68  ERR("RpcBindingFree returned 0x%x\n", status);
69  }
70 }
RPC_STATUS WINAPI RpcBindingFree(RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:784
handle_t hBinding
Definition: ctx_c.c:54
long RPC_STATUS
Definition: rpc.h:52
#define TRACE(s)
Definition: solgame.cpp:4
#define ERR(fmt,...)
Definition: debug.h:109
static SERVICE_STATUS status
Definition: service.c:31
#define RPC_S_OK
Definition: rpcnterr.h:22
Definition: ps.c:97

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( advapi  )