ReactOS  0.4.13-dev-52-g0efcfec
dssetup.c File Reference
#include "netapi32.h"
#include <rpc.h>
#include "dssetup_c.h"
Include dependency graph for dssetup.c:

Go to the source code of this file.

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (netapi32)
 
static RPC_STATUS DsSetupBind (LPWSTR lpServerName, handle_t *hBinding)
 
static void DsSetupUnbind (handle_t hBinding)
 
VOID WINAPI DsRoleFreeMemory (_In_ PVOID Buffer)
 
DWORD WINAPI DsRoleGetPrimaryDomainInformation (LPCWSTR lpServer, DSROLE_PRIMARY_DOMAIN_INFO_LEVEL InfoLevel, PBYTE *Buffer)
 

Function Documentation

◆ DsRoleFreeMemory()

VOID WINAPI DsRoleFreeMemory ( _In_ PVOID  Buffer)

Definition at line 82 of file dssetup.c.

84 {
85  TRACE("DsRoleFreeMemory(%p)\n", Buffer);
87 }
Definition: bufpool.h:45
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
#define HeapFree(x, y, z)
Definition: compat.h:394

Referenced by _LocalGetPrintServerHandleData(), and START_TEST().

◆ DsRoleGetPrimaryDomainInformation()

DWORD WINAPI DsRoleGetPrimaryDomainInformation ( LPCWSTR lpServer  ,
DSROLE_PRIMARY_DOMAIN_INFO_LEVEL  InfoLevel,
PBYTE Buffer 
)

Definition at line 92 of file dssetup.c.

96 {
99 
100  TRACE("DsRoleGetPrimaryDomainInformation(%p, %d, %p)\n",
101  lpServer, InfoLevel, Buffer);
102 
103  /* Check some input parameters */
104 
105  if (!Buffer)
107 
108  if ((InfoLevel < DsRolePrimaryDomainInfoBasic) || (InfoLevel > DsRoleOperationState))
110 
111  *Buffer = NULL;
112 
113  status = DsSetupBind((LPWSTR)lpServer, &hBinding);
114  if (status)
115  {
116  TRACE("DsSetupBind() failed (Status %lu\n)", status);
117  return status;
118  }
119 
121  {
123  InfoLevel,
125  }
127  {
129  }
130  RpcEndExcept;
131 
132  if (hBinding != NULL)
134 
135  return status;
136 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
#define RpcEndExcept
Definition: rpc.h:128
handle_t hBinding
Definition: ctx_c.c:54
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
DWORD WINAPI DsRolerGetPrimaryDomainInformation(handle_t hBinding, DSROLE_PRIMARY_DOMAIN_INFO_LEVEL InfoLevel, PDSROLER_PRIMARY_DOMAIN_INFORMATION *DomainInfo)
Definition: dssetup.c:138
smooth NULL
Definition: ftsmooth.c:416
Definition: bufpool.h:45
static void DsSetupUnbind(handle_t hBinding)
Definition: dssetup.c:65
DWORD NET_API_STATUS
Definition: ms-dtyp.idl:91
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
static RPC_STATUS DsSetupBind(LPWSTR lpServerName, handle_t *hBinding)
Definition: dssetup.c:22
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static SERVICE_STATUS status
Definition: service.c:31
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:741
Definition: ps.c:97

Referenced by _LocalGetPrintServerHandleData(), and START_TEST().

◆ DsSetupBind()

static RPC_STATUS DsSetupBind ( LPWSTR  lpServerName,
handle_t hBinding 
)
static

Definition at line 22 of file dssetup.c.

25 {
26  LPWSTR pszStringBinding;
28 
29  TRACE("DsSetupBind() called\n");
30 
31  *hBinding = NULL;
32 
34  L"ncacn_np",
35  lpServerName,
36  L"\\pipe\\lsarpc",
37  NULL,
38  &pszStringBinding);
39  if (status)
40  {
41  TRACE("RpcStringBindingCompose returned 0x%x\n", status);
42  return status;
43  }
44 
45  /* Set the binding handle that will be used to bind to the server. */
46  status = RpcBindingFromStringBindingW(pszStringBinding,
47  hBinding);
48  if (status)
49  {
50  TRACE("RpcBindingFromStringBinding returned 0x%x\n", status);
51  }
52 
53  status = RpcStringFreeW(&pszStringBinding);
54  if (status)
55  {
56  TRACE("RpcStringFree returned 0x%x\n", status);
57  }
58 
59  return status;
60 }
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
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

Referenced by DsRoleGetPrimaryDomainInformation().

◆ DsSetupUnbind()

static void DsSetupUnbind ( handle_t  hBinding)
static

Definition at line 65 of file dssetup.c.

67 {
69 
70  TRACE("DsSetupUnbind()\n");
71 
73  if (status)
74  {
75  TRACE("RpcBindingFree returned 0x%x\n", status);
76  }
77 }
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
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

Referenced by DsRoleGetPrimaryDomainInformation().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( netapi32  )