' ########################################################################################
' Microsoft Windows
' File: RpcNsip.inc
' Contents: Types and function definitions to use the to implement the autohandle features of the runtime
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
#IF NOT %DEF(PBX_RpcNsip_PBI)
#DEFINE PBX_RpcNsip_PBI
%EQUATE `RPCNSIP_INC = 1
#INCLUDE ONCE "Legacy/Network/RpcDce.inc"
' // Size = 12 bytes
TYPE RPC_IMPORT_CONTEXT_P DWORD
 LookupContext AS DWORD ' RPC_NS_HANDLE
 ProposedHandle AS DWORD ' RPC_NS_HANDLE
 Bindings AS RPC_BINDING_VECTOR PTR ' RPC_BINDING_VECTOR *
END TYPE
'/* Stub Auto Binding routines. */
DECLARE FUNCTION I_RpcNsGetBuffer LIB "rpcns4.dll" ALIAS "I_RpcNsGetBuffer" ( BYREF Message AS RPC_MESSAGE ) AS LONG ' RPC_STATUS
DECLARE FUNCTION I_RpcNsSendReceive LIB "rpcns4.dll" ALIAS "I_RpcNsSendReceive" ( BYREF Message AS RPC_MESSAGE , BYREF Handle AS QUAD ) AS LONG ' RPC_STATUS
DECLARE SUB I_RpcNsRaiseException LIB "rpcns4.dll" ALIAS "I_RpcNsRaiseException" ( BYREF Message AS RPC_MESSAGE , BYVAL Status AS QUAD ) ' void
DECLARE FUNCTION I_RpcReBindBuffer LIB "rpcns4.dll" ALIAS "I_RpcReBindBuffer" ( BYREF Message AS RPC_MESSAGE ) AS LONG ' RPC_STATUS
' Not exported in Windows XP
DECLARE FUNCTION I_NsServerBindSearch LIB "rpcns4.dll" ALIAS "I_NsServerBindSearch" ( ) AS LONG ' RPC_STATUS
' Not exported in Windows XP
DECLARE FUNCTION I_NsClientBindSearch LIB "rpcns4.dll" ALIAS "I_NsClientBindSearch" ( ) AS LONG ' RPC_STATUS
' Not exported in Windows XP
DECLARE SUB I_NsClientBindDone LIB "rpcns4.dll" ALIAS "I_NsClientBindDone" () ' void
#ENDIF
