ReactOS 0.4.16-dev-297-gc569aee
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 GetProcessHeap()
Definition: compat.h:736
#define HeapFree(x, y, z)
Definition: compat.h:735
#define TRACE(s)
Definition: solgame.cpp:4

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)\n", status);
117 return status;
118 }
119
121 {
123 InfoLevel,
125 }
127 {
129 }
131
132 if (hBinding != NULL)
134
135 return status;
136}
handle_t hBinding
Definition: ctx_c.c:54
#define NULL
Definition: types.h:112
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
@ DsRolePrimaryDomainInfoBasic
Definition: dsrole.h:32
@ DsRoleOperationState
Definition: dsrole.h:34
#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
DWORD NET_API_STATUS
Definition: ms-dtyp.idl:91
static RPC_STATUS DsSetupBind(LPWSTR lpServerName, handle_t *hBinding)
Definition: dssetup.c:22
static void DsSetupUnbind(handle_t hBinding)
Definition: dssetup.c:65
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:740
#define RpcEndExcept
Definition: rpc.h:128
#define RpcTryExcept
Definition: rpc.h:126
#define RpcExcept(expr)
Definition: rpc.h:127
#define RpcExceptionCode()
Definition: rpc.h:132
Definition: ps.c:97
WCHAR * LPWSTR
Definition: xmlstorage.h:184

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}
#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 RpcStringFreeW(RPC_WSTR *String)
Definition: rpcrt4_main.c:175
long RPC_STATUS
Definition: rpc.h:52

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:787

Referenced by DsRoleGetPrimaryDomainInformation().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( netapi32  )