ReactOS  0.4.13-dev-73-gcfe54aa
rpc.c File Reference
#include "setupapi_private.h"
Include dependency graph for rpc.c:

Go to the source code of this file.

Functions

RPC_STATUS PnpBindRpc (LPCWSTR pszMachine, RPC_BINDING_HANDLE *BindingHandle)
 
RPC_STATUS PnpUnbindRpc (RPC_BINDING_HANDLE *BindingHandle)
 
BOOL PnpGetLocalHandles (RPC_BINDING_HANDLE *BindingHandle, HSTRING_TABLE *StringTable)
 
RPC_STATUS PnpUnbindLocalBindingHandle (VOID)
 
void __RPC_FAR *__RPC_USER midl_user_allocate (SIZE_T len)
 
void __RPC_USER midl_user_free (void __RPC_FAR *ptr)
 

Variables

static RPC_BINDING_HANDLE LocalBindingHandle = NULL
 
static HSTRING_TABLE LocalStringTable = NULL
 

Function Documentation

◆ midl_user_allocate()

void __RPC_FAR* __RPC_USER midl_user_allocate ( SIZE_T  len)

Definition at line 112 of file rpc.c.

113 {
115 }
#define GetProcessHeap()
Definition: compat.h:395
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 119 of file rpc.c.

120 {
121  HeapFree(GetProcessHeap(), 0, ptr);
122 }
static PVOID ptr
Definition: dispmode.c:27
#define GetProcessHeap()
Definition: compat.h:395
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ PnpBindRpc()

RPC_STATUS PnpBindRpc ( LPCWSTR  pszMachine,
RPC_BINDING_HANDLE BindingHandle 
)

Definition at line 28 of file rpc.c.

30 {
31  PWSTR pszStringBinding = NULL;
33 
35  L"ncacn_np",
36  (LPWSTR)pszMachine,
37  L"\\pipe\\plugplay",
38  NULL,
39  &pszStringBinding);
40  if (Status != RPC_S_OK)
41  return Status;
42 
43  Status = RpcBindingFromStringBindingW(pszStringBinding,
45 
46  RpcStringFreeW(&pszStringBinding);
47 
48  return Status;
49 }
RPC_STATUS WINAPI RpcBindingFromStringBindingW(RPC_WSTR StringBinding, RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:877
RPC_STATUS WINAPI RpcStringFreeW(RPC_WSTR *String)
Definition: rpcrt4_main.c:177
uint16_t * PWSTR
Definition: typedefs.h:54
_In_ ULONG _Out_ HANDLE * BindingHandle
Definition: tdikrnl.h:1146
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
static const WCHAR L[]
Definition: oid.c:1250
Status
Definition: gdiplustypes.h:24
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define RPC_S_OK
Definition: rpcnterr.h:22

Referenced by CM_Connect_MachineW(), and PnpGetLocalHandles().

◆ PnpGetLocalHandles()

BOOL PnpGetLocalHandles ( RPC_BINDING_HANDLE BindingHandle,
HSTRING_TABLE StringTable 
)

Definition at line 66 of file rpc.c.

68 {
69  if (LocalBindingHandle != NULL)
70  {
71  if (BindingHandle != NULL)
73 
74  if (StringTable != NULL)
75  *StringTable = LocalStringTable;
76 
77  return TRUE;
78  }
79 
81  if (LocalStringTable == NULL)
82  return FALSE;
83 
85  {
87  return FALSE;
88  }
89 
91 
92  if (BindingHandle != NULL)
94 
95  if (StringTable != NULL)
96  *StringTable = LocalStringTable;
97 
98  return TRUE;
99 }
#define TRUE
Definition: types.h:120
HSTRING_TABLE WINAPI pSetupStringTableInitialize(VOID)
Definition: stringtable.c:54
RPC_STATUS PnpBindRpc(LPCWSTR pszMachine, RPC_BINDING_HANDLE *BindingHandle)
Definition: rpc.c:28
_In_ ULONG _Out_ HANDLE * BindingHandle
Definition: tdikrnl.h:1146
static RPC_BINDING_HANDLE LocalBindingHandle
Definition: rpc.c:23
smooth NULL
Definition: ftsmooth.c:416
DWORD WINAPI pSetupStringTableAddString(HSTRING_TABLE hStringTable, LPWSTR lpString, DWORD dwFlags)
Definition: stringtable.c:196
static HSTRING_TABLE LocalStringTable
Definition: rpc.c:24
static const WCHAR L[]
Definition: oid.c:1250
VOID WINAPI pSetupStringTableDestroy(HSTRING_TABLE hStringTable)
Definition: stringtable.c:145
#define RPC_S_OK
Definition: rpcnterr.h:22

Referenced by CM_Add_Empty_Log_Conf_Ex(), CM_Add_ID_ExW(), CM_Connect_MachineW(), CM_Create_DevNode_ExW(), CM_Delete_Class_Key_Ex(), CM_Disable_DevNode_Ex(), CM_Enable_DevNode_Ex(), CM_Enumerate_Classes_Ex(), CM_Enumerate_Enumerators_ExW(), CM_Free_Log_Conf_Ex(), CM_Get_Child_Ex(), CM_Get_Class_Name_ExW(), CM_Get_Class_Registry_PropertyW(), CM_Get_Depth_Ex(), CM_Get_Device_ID_ExW(), CM_Get_Device_ID_List_ExW(), CM_Get_Device_ID_List_Size_ExW(), CM_Get_Device_ID_Size_Ex(), CM_Get_Device_Interface_Alias_ExW(), CM_Get_Device_Interface_List_ExW(), CM_Get_Device_Interface_List_Size_ExW(), CM_Get_DevNode_Custom_Property_ExW(), CM_Get_DevNode_Registry_Property_ExW(), CM_Get_DevNode_Status_Ex(), CM_Get_First_Log_Conf_Ex(), CM_Get_Global_State_Ex(), CM_Get_Hardware_Profile_Info_ExW(), CM_Get_HW_Prof_Flags_ExW(), CM_Get_Log_Conf_Priority_Ex(), CM_Get_Next_Log_Conf_Ex(), CM_Get_Parent_Ex(), CM_Get_Sibling_Ex(), CM_Get_Version_Ex(), CM_Is_Dock_Station_Present_Ex(), CM_Is_Version_Available_Ex(), CM_Locate_DevNode_ExW(), CM_Move_DevNode_Ex(), CM_Open_DevNode_Key_Ex(), CM_Query_And_Remove_SubTree_ExW(), CM_Query_Arbitrator_Free_Data_Ex(), CM_Query_Arbitrator_Free_Size_Ex(), CM_Query_Resource_Conflict_List(), CM_Reenumerate_DevNode_Ex(), CM_Register_Device_Driver_Ex(), CM_Register_Device_Interface_ExW(), CM_Request_Device_Eject_ExW(), CM_Request_Eject_PC_Ex(), CM_Run_Detection_Ex(), CM_Set_DevNode_Problem_Ex(), CM_Set_DevNode_Registry_Property_ExW(), CM_Set_HW_Prof_Ex(), CM_Set_HW_Prof_Flags_ExW(), CM_Setup_DevNode_Ex(), CM_Uninstall_DevNode_Ex(), CM_Unregister_Device_Interface_ExW(), CMP_GetBlockedDriverInfo(), CMP_GetServerSideDeviceInstallFlags(), CMP_Init_Detection(), CMP_RegisterNotification(), CMP_Report_LogOn(), CMP_UnregisterNotification(), and CMP_WaitServicesAvailable().

◆ PnpUnbindLocalBindingHandle()

RPC_STATUS PnpUnbindLocalBindingHandle ( VOID  )

Definition at line 103 of file rpc.c.

104 {
108 }
RPC_STATUS PnpUnbindRpc(RPC_BINDING_HANDLE *BindingHandle)
Definition: rpc.c:53
static RPC_BINDING_HANDLE LocalBindingHandle
Definition: rpc.c:23
smooth NULL
Definition: ftsmooth.c:416
static HSTRING_TABLE LocalStringTable
Definition: rpc.c:24
VOID WINAPI pSetupStringTableDestroy(HSTRING_TABLE hStringTable)
Definition: stringtable.c:145

◆ PnpUnbindRpc()

RPC_STATUS PnpUnbindRpc ( RPC_BINDING_HANDLE BindingHandle)

Definition at line 53 of file rpc.c.

54 {
55  if (BindingHandle != NULL)
56  {
59  }
60 
61  return RPC_S_OK;
62 }
RPC_STATUS WINAPI RpcBindingFree(RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:784
_In_ ULONG _Out_ HANDLE * BindingHandle
Definition: tdikrnl.h:1146
smooth NULL
Definition: ftsmooth.c:416
#define RPC_S_OK
Definition: rpcnterr.h:22

Referenced by CM_Disconnect_Machine(), and PnpUnbindLocalBindingHandle().

Variable Documentation

◆ LocalBindingHandle

RPC_BINDING_HANDLE LocalBindingHandle = NULL
static

Definition at line 23 of file rpc.c.

Referenced by PnpGetLocalHandles(), and PnpUnbindLocalBindingHandle().

◆ LocalStringTable

HSTRING_TABLE LocalStringTable = NULL
static

Definition at line 24 of file rpc.c.

Referenced by PnpGetLocalHandles(), and PnpUnbindLocalBindingHandle().