ReactOS  0.4.15-dev-506-ga3ec01c
rpc.c File Reference
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <dnsrslvr_c.h>
#include <debug.h>
Include dependency graph for rpc.c:

Go to the source code of this file.

Macros

#define WIN32_NO_STATUS
 
#define _INC_WINDOWS
 
#define COM_NO_WINDOWS_H
 
#define NDEBUG
 

Functions

handle_t __RPC_USER DNSRSLVR_HANDLE_bind (DNSRSLVR_HANDLE pszMachineName)
 
void __RPC_USER DNSRSLVR_HANDLE_unbind (DNSRSLVR_HANDLE pszMachineName, handle_t hBinding)
 
void __RPC_FAR *__RPC_USER midl_user_allocate (SIZE_T len)
 
void __RPC_USER midl_user_free (void __RPC_FAR *ptr)
 

Macro Definition Documentation

◆ _INC_WINDOWS

#define _INC_WINDOWS

Definition at line 2 of file rpc.c.

◆ COM_NO_WINDOWS_H

#define COM_NO_WINDOWS_H

Definition at line 3 of file rpc.c.

◆ NDEBUG

#define NDEBUG

Definition at line 9 of file rpc.c.

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 1 of file rpc.c.

Function Documentation

◆ DNSRSLVR_HANDLE_bind()

handle_t __RPC_USER DNSRSLVR_HANDLE_bind ( DNSRSLVR_HANDLE  pszMachineName)

Definition at line 13 of file rpc.c.

14 {
16  LPWSTR pszStringBinding;
18 
19  DPRINT1("DNSRSLVR_HANDLE_bind(%S)\n", pszMachineName);
20 
22  L"ncalrpc",
23  pszMachineName,
24  L"DNSResolver",
25  NULL,
26  &pszStringBinding);
27  if (Status != RPC_S_OK)
28  {
29  DPRINT1("RpcStringBindingCompose returned 0x%x\n", Status);
30  return NULL;
31  }
32 
33  /* Set the binding handle that will be used to bind to the server. */
34  Status = RpcBindingFromStringBindingW(pszStringBinding,
35  &hBinding);
36  if (Status != RPC_S_OK)
37  {
38  DPRINT1("RpcBindingFromStringBinding returned 0x%x\n", Status);
39  }
40 
41  Status = RpcStringFreeW(&pszStringBinding);
42  if (Status != RPC_S_OK)
43  {
44  DPRINT1("RpcStringFree returned 0x%x\n", Status);
45  }
46 
47  return hBinding;
48 }
RPC_STATUS WINAPI RpcBindingFromStringBindingW(RPC_WSTR StringBinding, RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:876
handle_t hBinding
Definition: ctx_c.c:54
RPC_STATUS WINAPI RpcStringFreeW(RPC_WSTR *String)
Definition: rpcrt4_main.c:174
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
long RPC_STATUS
Definition: rpc.h:52
smooth NULL
Definition: ftsmooth.c:416
static const WCHAR L[]
Definition: oid.c:1250
Status
Definition: gdiplustypes.h:24
#define DPRINT1
Definition: precomp.h:8
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define RPC_S_OK
Definition: rpcnterr.h:22

◆ DNSRSLVR_HANDLE_unbind()

void __RPC_USER DNSRSLVR_HANDLE_unbind ( DNSRSLVR_HANDLE  pszMachineName,
handle_t  hBinding 
)

Definition at line 51 of file rpc.c.

53 {
55 
56  DPRINT("DNSRSLVR_HANDLE_unbind(%S)\n", pszMachineName);
57 
59  if (Status != RPC_S_OK)
60  {
61  DPRINT1("RpcBindingFree returned 0x%x\n", Status);
62  }
63 }
RPC_STATUS WINAPI RpcBindingFree(RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:783
handle_t hBinding
Definition: ctx_c.c:54
long RPC_STATUS
Definition: rpc.h:52
void DPRINT(...)
Definition: polytest.cpp:61
Status
Definition: gdiplustypes.h:24
#define DPRINT1
Definition: precomp.h:8
#define RPC_S_OK
Definition: rpcnterr.h:22

◆ midl_user_allocate()

void __RPC_FAR* __RPC_USER midl_user_allocate ( SIZE_T  len)

Definition at line 66 of file rpc.c.

67 {
69 }
#define GetProcessHeap()
Definition: compat.h:404
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
GLenum GLsizei len
Definition: glext.h:6722
#define HEAP_ZERO_MEMORY
Definition: compat.h:123

◆ midl_user_free()

void __RPC_USER midl_user_free ( void __RPC_FAR ptr)

Definition at line 72 of file rpc.c.

73 {
75 }
static PVOID ptr
Definition: dispmode.c:27
#define GetProcessHeap()
Definition: compat.h:404
#define HeapFree(x, y, z)
Definition: compat.h:403