ReactOS 0.4.16-dev-1946-g52006dd
rpcdce.h File Reference
#include <guiddef.h>
#include <rpcdcep.h>
Include dependency graph for rpcdce.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _RPC_BINDING_VECTOR
 
struct  _UUID_VECTOR
 
struct  _RPC_IF_ID
 
struct  RPC_IF_ID_VECTOR
 
struct  RPC_STATS_VECTOR
 
struct  _RPC_PROTSEQ_VECTORA
 
struct  _RPC_PROTSEQ_VECTORW
 
struct  _RPC_POLICY
 
struct  _SEC_WINNT_AUTH_IDENTITY_W
 
struct  _SEC_WINNT_AUTH_IDENTITY_A
 
struct  _RPC_HTTP_TRANSPORT_CREDENTIALS_W
 
struct  _RPC_HTTP_TRANSPORT_CREDENTIALS_A
 
struct  _RPC_SECURITY_QOS
 
struct  _RPC_SECURITY_QOS_V2_W
 
struct  _RPC_SECURITY_QOS_V2_A
 

Macros

#define IN
 
#define OUT
 
#define OPTIONAL
 
#define UUID_DEFINED
 
#define rpc_binding_handle_t   RPC_BINDING_HANDLE
 
#define RPC_MGR_EPV   void
 
#define rpc_binding_vector_t   RPC_BINDING_VECTOR
 
#define uuid_vector_t   UUID_VECTOR
 
#define RPC_C_EP_ALL_ELTS   0
 
#define RPC_C_EP_MATCH_BY_IF   1
 
#define RPC_C_EP_MATCH_BY_OBJ   2
 
#define RPC_C_EP_MATCH_BY_BOTH   3
 
#define RPC_C_VERS_ALL   1
 
#define RPC_C_VERS_COMPATIBLE   2
 
#define RPC_C_VERS_EXACT   3
 
#define RPC_C_VERS_MAJOR_ONLY   4
 
#define RPC_C_VERS_UPTO   5
 
#define RPC_C_BINDING_INFINITE_TIMEOUT   10
 
#define RPC_C_BINDING_MIN_TIMEOUT   0
 
#define RPC_C_BINDING_DEFAULT_TIMEOUT   5
 
#define RPC_C_BINDING_MAX_TIMEOUT   9
 
#define RPC_C_CANCEL_INFINITE_TIMEOUT   -1
 
#define RPC_C_LISTEN_MAX_CALLS_DEFAULT   1234
 
#define RPC_C_PROTSEQ_MAX_REQS_DEFAULT   10
 
#define RPC_PROTSEQ_TCP   0x1
 
#define RPC_PROTSEQ_NMP   0x2
 
#define RPC_PROTSEQ_LRPC   0x3
 
#define RPC_PROTSEQ_HTTP   0x4
 
#define RPC_C_BIND_TO_ALL_NICS   0x1
 
#define RPC_C_USE_INTERNET_PORT   0x1
 
#define RPC_C_USE_INTRANET_PORT   0x2
 
#define RPC_C_DONT_FAIL   0x4
 
#define RPC_C_MQ_TEMPORARY   0x0000
 
#define RPC_C_MQ_PERMANENT   0x0001
 
#define RPC_C_MQ_CLEAR_ON_OPEN   0x0002
 
#define RPC_C_MQ_USE_EXISTING_SECURITY   0x0004
 
#define RPC_C_MQ_AUTHN_LEVEL_NONE   0x0000
 
#define RPC_C_MQ_AUTHN_LEVEL_PKT_INTEGRITY   0x0008
 
#define RPC_C_MQ_AUTHN_LEVEL_PKT_PRIVACY   0x0010
 
#define RPC_C_AUTHN_LEVEL_DEFAULT   0
 
#define RPC_C_AUTHN_LEVEL_NONE   1
 
#define RPC_C_AUTHN_LEVEL_CONNECT   2
 
#define RPC_C_AUTHN_LEVEL_CALL   3
 
#define RPC_C_AUTHN_LEVEL_PKT   4
 
#define RPC_C_AUTHN_LEVEL_PKT_INTEGRITY   5
 
#define RPC_C_AUTHN_LEVEL_PKT_PRIVACY   6
 
#define RPC_C_AUTHN_NONE   0
 
#define RPC_C_AUTHN_DCE_PRIVATE   1
 
#define RPC_C_AUTHN_DCE_PUBLIC   2
 
#define RPC_C_AUTHN_DEC_PUBLIC   4
 
#define RPC_C_AUTHN_GSS_NEGOTIATE   9
 
#define RPC_C_AUTHN_WINNT   10
 
#define RPC_C_AUTHN_GSS_SCHANNEL   14
 
#define RPC_C_AUTHN_GSS_KERBEROS   16
 
#define RPC_C_AUTHN_DPA   17
 
#define RPC_C_AUTHN_MSN   18
 
#define RPC_C_AUTHN_DIGEST   21
 
#define RPC_C_AUTHN_MQ   100
 
#define RPC_C_AUTHN_DEFAULT   0xffffffff
 
#define RPC_C_AUTHZ_NONE   0
 
#define RPC_C_AUTHZ_NAME   1
 
#define RPC_C_AUTHZ_DCE   2
 
#define RPC_C_AUTHZ_DEFAULT   0xffffffff
 
#define RPC_C_IMP_LEVEL_DEFAULT   0
 
#define RPC_C_IMP_LEVEL_ANONYMOUS   1
 
#define RPC_C_IMP_LEVEL_IDENTIFY   2
 
#define RPC_C_IMP_LEVEL_IMPERSONATE   3
 
#define RPC_C_IMP_LEVEL_DELEGATE   4
 
#define RPC_C_QOS_IDENTITY_STATIC   0
 
#define RPC_C_QOS_IDENTITY_DYNAMIC   1
 
#define RPC_C_QOS_CAPABILITIES_DEFAULT   0x0
 
#define RPC_C_QOS_CAPABILITIES_MUTUAL_AUTH   0x1
 
#define RPC_C_QOS_CAPABILITIES_MAKE_FULLSIC   0x2
 
#define RPC_C_QOS_CAPABILITIES_ANY_AUTHORITY   0x4
 
#define RPC_C_SECURITY_QOS_VERSION   1
 
#define RPC_C_SECURITY_QOS_VERSION_1   1
 
#define RPC_C_SECURITY_QOS_VERSION_2   2
 
#define RPC_C_AUTHN_INFO_TYPE_HTTP   1
 
#define RPC_C_HTTP_FLAG_USE_SSL   0x1
 
#define RPC_C_HTTP_FLAG_USE_FIRST_AUTH_SCHEME   0x2
 
#define RPC_C_HTTP_AUTHN_TARGET_SERVER   1
 
#define RPC_C_HTTP_AUTHN_TARGET_PROXY   2
 
#define RPC_C_HTTP_AUTHN_SCHEME_BASIC   0x01
 
#define RPC_C_HTTP_AUTHN_SCHEME_NTLM   0x02
 
#define RPC_C_HTTP_AUTHN_SCHEME_PASSPORT   0x04
 
#define RPC_C_HTTP_AUTHN_SCHEME_DIGEST   0x08
 
#define RPC_C_HTTP_AUTHN_SCHEME_NEGOTIATE   0x10
 
#define _SEC_WINNT_AUTH_IDENTITY   WINELIB_NAME_AW(_SEC_WINNT_AUTH_IDENTITY_)
 
#define SEC_WINNT_AUTH_IDENTITY   WINELIB_NAME_AW(SEC_WINNT_AUTH_IDENTITY_)
 
#define PSEC_WINNT_AUTH_IDENTITY   WINELIB_NAME_AW(PSEC_WINNT_AUTH_IDENTITY_)
 
#define RPC_HTTP_TRANSPORT_CREDENTIALS_   WINELIB_NAME_AW(RPC_HTTP_TRANSPORT_CREDENTIALS_)
 
#define PRPC_HTTP_TRANSPORT_CREDENTIALS_   WINELIB_NAME_AW(PRPC_HTTP_TRANSPORT_CREDENTIALS_)
 
#define _RPC_HTTP_TRANSPORT_CREDENTIALS_   WINELIB_NAME_AW(_RPC_HTTP_TRANSPORT_CREDENTIALS_)
 
#define RPC_SECURITY_QOS_V2   WINELIB_NAME_AW(RPC_SECURITY_QOS_V2_)
 
#define PRPC_SECURITY_QOS_V2   WINELIB_NAME_AW(PRPC_SECURITY_QOS_V2_)
 
#define _RPC_SECURITY_QOS_V2   WINELIB_NAME_AW(_RPC_SECURITY_QOS_V2_)
 
#define SEC_WINNT_AUTH_IDENTITY_ANSI   0x1
 
#define SEC_WINNT_AUTH_IDENTITY_UNICODE   0x2
 
#define RPC_IF_AUTOLISTEN   0x01
 
#define RPC_IF_OLE   0x02
 
#define RPC_IF_ALLOW_UNKNOWN_AUTHORITY   0x04
 
#define RPC_IF_ALLOW_SECURE_ONLY   0x08
 
#define RPC_IF_ALLOW_CALLBACKS_WITH_NO_AUTH   0x10
 
#define RPC_IF_ALLOW_LOCAL_ONLY   0x20
 
#define RPC_IF_SEC_NO_CACHE   0x40
 
#define DceErrorInqText   WINELIB_NAME_AW(DceErrorInqText)
 
#define RpcBindingFromStringBinding   WINELIB_NAME_AW(RpcBindingFromStringBinding)
 
#define RpcBindingToStringBinding   WINELIB_NAME_AW(RpcBindingToStringBinding)
 
#define RpcStringBindingCompose   WINELIB_NAME_AW(RpcStringBindingCompose)
 
#define RpcStringBindingParse   WINELIB_NAME_AW(RpcStringBindingParse)
 
#define RpcEpRegister   WINELIB_NAME_AW(RpcEpRegister)
 
#define RpcEpRegisterNoReplace   WINELIB_NAME_AW(RpcEpRegisterNoReplace)
 
#define RpcServerUseProtseq   WINELIB_NAME_AW(RpcServerUseProtseq)
 
#define RpcServerUseProtseqEp   WINELIB_NAME_AW(RpcServerUseProtseqEp)
 
#define RpcServerUseProtseqEpEx   WINELIB_NAME_AW(RpcServerUseProtseqEpEx)
 
#define RpcServerRegisterAuthInfo   WINELIB_NAME_AW(RpcServerRegisterAuthInfo)
 
#define RpcBindingSetAuthInfoEx   WINELIB_NAME_AW(RpcBindingSetAuthInfoEx)
 
#define RpcBindingSetAuthInfo   WINELIB_NAME_AW(RpcBindingSetAuthInfo)
 
#define RpcBindingInqAuthInfoEx   WINELIB_NAME_AW(RpcBindingInqAuthInfoEx)
 
#define RpcBindingInqAuthInfo   WINELIB_NAME_AW(RpcBindingInqAuthInfo)
 
#define RpcBindingInqAuthClient   WINELIB_NAME_AW(RpcBindingInqAuthClient)
 
#define RpcBindingInqAuthClientEx   WINELIB_NAME_AW(RpcBindingInqAuthClientEx)
 
#define RpcNetworkIsProtseqValid   WINELIB_NAME_AW(RpcNetworkIsProtseqValid)
 
#define RpcNetworkInqProtseqs   WINELIB_NAME_AW(RpcNetworkInqProtseqs)
 
#define RpcProtseqVectorFree   WINELIB_NAME_AW(RpcProtseqVectorFree)
 
#define RpcStringFree   WINELIB_NAME_AW(RpcStringFree)
 
#define UuidToString   WINELIB_NAME_AW(UuidToString)
 
#define UuidFromString   WINELIB_NAME_AW(UuidFromString)
 
#define RpcServerInqDefaultPrincName   WINELIB_NAME_AW(RpcServerInqDefaultPrincName)
 

Typedefs

typedef GUID UUID
 
typedef unsigned charRPC_CSTR
 
typedef unsigned shortRPC_WSTR
 
typedef voidRPC_AUTH_IDENTITY_HANDLE
 
typedef voidRPC_AUTHZ_HANDLE
 
typedef voidRPC_IF_HANDLE
 
typedef I_RPC_HANDLE RPC_BINDING_HANDLE
 
typedef RPC_BINDING_HANDLE handle_t
 
typedef struct _RPC_BINDING_VECTOR RPC_BINDING_VECTOR
 
typedef struct _UUID_VECTOR UUID_VECTOR
 
typedef struct _RPC_IF_ID RPC_IF_ID
 
typedef struct _RPC_PROTSEQ_VECTORA RPC_PROTSEQ_VECTORA
 
typedef struct _RPC_PROTSEQ_VECTORW RPC_PROTSEQ_VECTORW
 
typedef I_RPC_HANDLERPC_EP_INQ_HANDLE
 
typedef RPC_STATUS RPC_ENTRY RPC_IF_CALLBACK_FN(RPC_IF_HANDLE InterfaceUuid, void *Context)
 
typedef void(__RPC_USERRPC_AUTH_KEY_RETRIEVAL_FN) (void *, RPC_WSTR, ULONG, void **, RPC_STATUS *)
 
typedef struct _RPC_POLICY RPC_POLICY
 
typedef struct _RPC_POLICYPRPC_POLICY
 
typedef struct _SEC_WINNT_AUTH_IDENTITY_W SEC_WINNT_AUTH_IDENTITY_W
 
typedef struct _SEC_WINNT_AUTH_IDENTITY_WPSEC_WINNT_AUTH_IDENTITY_W
 
typedef struct _SEC_WINNT_AUTH_IDENTITY_A SEC_WINNT_AUTH_IDENTITY_A
 
typedef struct _SEC_WINNT_AUTH_IDENTITY_APSEC_WINNT_AUTH_IDENTITY_A
 
typedef struct _RPC_HTTP_TRANSPORT_CREDENTIALS_W RPC_HTTP_TRANSPORT_CREDENTIALS_W
 
typedef struct _RPC_HTTP_TRANSPORT_CREDENTIALS_WPRPC_HTTP_TRANSPORT_CREDENTIALS_W
 
typedef struct _RPC_HTTP_TRANSPORT_CREDENTIALS_A RPC_HTTP_TRANSPORT_CREDENTIALS_A
 
typedef struct _RPC_HTTP_TRANSPORT_CREDENTIALS_APRPC_HTTP_TRANSPORT_CREDENTIALS_A
 
typedef struct _RPC_SECURITY_QOS RPC_SECURITY_QOS
 
typedef struct _RPC_SECURITY_QOSPRPC_SECURITY_QOS
 
typedef struct _RPC_SECURITY_QOS_V2_W RPC_SECURITY_QOS_V2_W
 
typedef struct _RPC_SECURITY_QOS_V2_WPRPC_SECURITY_QOS_V2_W
 
typedef struct _RPC_SECURITY_QOS_V2_A RPC_SECURITY_QOS_V2_A
 
typedef struct _RPC_SECURITY_QOS_V2_APRPC_SECURITY_QOS_V2_A
 
typedef int(__RPC_APIRPC_MGMT_AUTHORIZATION_FN) (RPC_BINDING_HANDLE, ULONG, RPC_STATUS *)
 

Functions

RPC_STATUS RPC_ENTRY DceErrorInqTextA (RPC_STATUS e, RPC_CSTR buffer)
 
RPC_STATUS RPC_ENTRY DceErrorInqTextW (RPC_STATUS e, RPC_WSTR buffer)
 
RPCRTAPI DECLSPEC_NORETURN void RPC_ENTRY RpcRaiseException (RPC_STATUS exception)
 
RPCRTAPI int RPC_ENTRY RpcExceptionFilter (ULONG)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingCopy (RPC_BINDING_HANDLE SourceBinding, RPC_BINDING_HANDLE *DestinationBinding)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingFree (RPC_BINDING_HANDLE *Binding)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingInqObject (RPC_BINDING_HANDLE Binding, UUID *ObjectUuid)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingInqOption (RPC_BINDING_HANDLE Binding, ULONG Option, ULONG_PTR *OptionValue)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingReset (RPC_BINDING_HANDLE Binding)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingServerFromClient (RPC_BINDING_HANDLE ClientBinding, RPC_BINDING_HANDLE *ServerBinding)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingSetObject (RPC_BINDING_HANDLE Binding, UUID *ObjectUuid)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingSetOption (RPC_BINDING_HANDLE Binding, ULONG Option, ULONG_PTR OptionValue)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcObjectSetType (UUID *ObjUuid, UUID *TypeUuid)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingFromStringBindingA (RPC_CSTR StringBinding, RPC_BINDING_HANDLE *Binding)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingFromStringBindingW (RPC_WSTR StringBinding, RPC_BINDING_HANDLE *Binding)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingToStringBindingA (RPC_BINDING_HANDLE Binding, RPC_CSTR *StringBinding)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingToStringBindingW (RPC_BINDING_HANDLE Binding, RPC_WSTR *StringBinding)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingVectorFree (RPC_BINDING_VECTOR **BindingVector)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcStringBindingComposeA (RPC_CSTR ObjUuid, RPC_CSTR Protseq, RPC_CSTR NetworkAddr, RPC_CSTR Endpoint, RPC_CSTR Options, RPC_CSTR *StringBinding)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcStringBindingComposeW (RPC_WSTR ObjUuid, RPC_WSTR Protseq, RPC_WSTR NetworkAddr, RPC_WSTR Endpoint, RPC_WSTR Options, RPC_WSTR *StringBinding)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcStringBindingParseA (RPC_CSTR StringBinding, RPC_CSTR *ObjUuid, RPC_CSTR *Protseq, RPC_CSTR *NetworkAddr, RPC_CSTR *Endpoint, RPC_CSTR *NetworkOptions)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcStringBindingParseW (RPC_WSTR StringBinding, RPC_WSTR *ObjUuid, RPC_WSTR *Protseq, RPC_WSTR *NetworkAddr, RPC_WSTR *Endpoint, RPC_WSTR *NetworkOptions)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcEpResolveBinding (RPC_BINDING_HANDLE Binding, RPC_IF_HANDLE IfSpec)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcEpRegisterA (RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR *BindingVector, UUID_VECTOR *UuidVector, RPC_CSTR Annotation)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcEpRegisterW (RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR *BindingVector, UUID_VECTOR *UuidVector, RPC_WSTR Annotation)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcEpRegisterNoReplaceA (RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR *BindingVector, UUID_VECTOR *UuidVector, RPC_CSTR Annotation)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcEpRegisterNoReplaceW (RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR *BindingVector, UUID_VECTOR *UuidVector, RPC_WSTR Annotation)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcEpUnregister (RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR *BindingVector, UUID_VECTOR *UuidVector)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerInqBindings (RPC_BINDING_VECTOR **BindingVector)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerListen (unsigned int MinimumCallThreads, unsigned int MaxCalls, unsigned int DontWait)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcMgmtEnableIdleCleanup (void)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcMgmtSetAuthorizationFn (RPC_MGMT_AUTHORIZATION_FN)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcMgmtSetCancelTimeout (LONG)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcMgmtWaitServerListen (void)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcMgmtInqStats (RPC_BINDING_HANDLE Binding, RPC_STATS_VECTOR **Statistics)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcMgmtStopServerListening (RPC_BINDING_HANDLE Binding)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcMgmtIsServerListening (RPC_BINDING_HANDLE Binding)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcMgmtInqIfIds (RPC_BINDING_HANDLE Binding, RPC_IF_ID_VECTOR **IfIdVector)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcMgmtEpEltInqBegin (RPC_BINDING_HANDLE EpBinding, ULONG InquiryType, RPC_IF_ID *IfId, ULONG VersOption, UUID *ObjectUuid, RPC_EP_INQ_HANDLE *InquiryContext)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcMgmtSetComTimeout (RPC_BINDING_HANDLE Binding, unsigned int Timeout)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcMgmtSetServerStackSize (ULONG ThreadStackSize)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcMgmtStatsVectorFree (RPC_STATS_VECTOR **StatsVector)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerRegisterIf (RPC_IF_HANDLE IfSpec, UUID *MgrTypeUuid, RPC_MGR_EPV *MgrEpv)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerRegisterIfEx (RPC_IF_HANDLE IfSpec, UUID *MgrTypeUuid, RPC_MGR_EPV *MgrEpv, unsigned int Flags, unsigned int MaxCalls, RPC_IF_CALLBACK_FN *IfCallbackFn)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerRegisterIf2 (RPC_IF_HANDLE IfSpec, UUID *MgrTypeUuid, RPC_MGR_EPV *MgrEpv, unsigned int Flags, unsigned int MaxCalls, unsigned int MaxRpcSize, RPC_IF_CALLBACK_FN *IfCallbackFn)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerRegisterIf3 (RPC_IF_HANDLE IfSpec, UUID *MgrTypeUuid, RPC_MGR_EPV *MgrEpv, unsigned int Flags, unsigned int MaxCalls, unsigned int MaxRpcSize, RPC_IF_CALLBACK_FN *IfCallbackFn, void *SecurityDescriptor)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerUnregisterIf (RPC_IF_HANDLE IfSpec, UUID *MgrTypeUuid, unsigned int WaitForCallsToComplete)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerUnregisterIfEx (RPC_IF_HANDLE IfSpec, UUID *MgrTypeUuid, int RundownContextHandles)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerUseProtseqA (RPC_CSTR Protseq, unsigned int MaxCalls, void *SecurityDescriptor)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerUseProtseqW (RPC_WSTR Protseq, unsigned int MaxCalls, void *SecurityDescriptor)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerUseProtseqEpA (RPC_CSTR Protseq, unsigned int MaxCalls, RPC_CSTR Endpoint, void *SecurityDescriptor)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerUseProtseqEpW (RPC_WSTR Protseq, unsigned int MaxCalls, RPC_WSTR Endpoint, void *SecurityDescriptor)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerUseProtseqEpExA (RPC_CSTR Protseq, unsigned int MaxCalls, RPC_CSTR Endpoint, void *SecurityDescriptor, PRPC_POLICY Policy)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerUseProtseqEpExW (RPC_WSTR Protseq, unsigned int MaxCalls, RPC_WSTR Endpoint, void *SecurityDescriptor, PRPC_POLICY Policy)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerRegisterAuthInfoA (RPC_CSTR ServerPrincName, ULONG AuthnSvc, RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn, void *Arg)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerRegisterAuthInfoW (RPC_WSTR ServerPrincName, ULONG AuthnSvc, RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn, void *Arg)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingSetAuthInfoExA (RPC_BINDING_HANDLE Binding, RPC_CSTR ServerPrincName, ULONG AuthnLevel, ULONG AuthnSvc, RPC_AUTH_IDENTITY_HANDLE AuthIdentity, ULONG AuthzSvr, RPC_SECURITY_QOS *SecurityQos)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingSetAuthInfoExW (RPC_BINDING_HANDLE Binding, RPC_WSTR ServerPrincName, ULONG AuthnLevel, ULONG AuthnSvc, RPC_AUTH_IDENTITY_HANDLE AuthIdentity, ULONG AuthzSvr, RPC_SECURITY_QOS *SecurityQos)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingSetAuthInfoA (RPC_BINDING_HANDLE Binding, RPC_CSTR ServerPrincName, ULONG AuthnLevel, ULONG AuthnSvc, RPC_AUTH_IDENTITY_HANDLE AuthIdentity, ULONG AuthzSvr)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingSetAuthInfoW (RPC_BINDING_HANDLE Binding, RPC_WSTR ServerPrincName, ULONG AuthnLevel, ULONG AuthnSvc, RPC_AUTH_IDENTITY_HANDLE AuthIdentity, ULONG AuthzSvr)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingInqAuthInfoExA (RPC_BINDING_HANDLE Binding, RPC_CSTR *ServerPrincName, ULONG *AuthnLevel, ULONG *AuthnSvc, RPC_AUTH_IDENTITY_HANDLE *AuthIdentity, ULONG *AuthzSvc, ULONG RpcQosVersion, RPC_SECURITY_QOS *SecurityQOS)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingInqAuthInfoExW (RPC_BINDING_HANDLE Binding, RPC_WSTR *ServerPrincName, ULONG *AuthnLevel, ULONG *AuthnSvc, RPC_AUTH_IDENTITY_HANDLE *AuthIdentity, ULONG *AuthzSvc, ULONG RpcQosVersion, RPC_SECURITY_QOS *SecurityQOS)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingInqAuthInfoA (RPC_BINDING_HANDLE Binding, RPC_CSTR *ServerPrincName, ULONG *AuthnLevel, ULONG *AuthnSvc, RPC_AUTH_IDENTITY_HANDLE *AuthIdentity, ULONG *AuthzSvc)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingInqAuthInfoW (RPC_BINDING_HANDLE Binding, RPC_WSTR *ServerPrincName, ULONG *AuthnLevel, ULONG *AuthnSvc, RPC_AUTH_IDENTITY_HANDLE *AuthIdentity, ULONG *AuthzSvc)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingInqAuthClientA (RPC_BINDING_HANDLE ClientBinding, RPC_AUTHZ_HANDLE *Privs, RPC_CSTR *ServerPrincName, ULONG *AuthnLevel, ULONG *AuthnSvc, ULONG *AuthzSvc)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingInqAuthClientW (RPC_BINDING_HANDLE ClientBinding, RPC_AUTHZ_HANDLE *Privs, RPC_WSTR *ServerPrincName, ULONG *AuthnLevel, ULONG *AuthnSvc, ULONG *AuthzSvc)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingInqAuthClientExA (RPC_BINDING_HANDLE ClientBinding, RPC_AUTHZ_HANDLE *Privs, RPC_CSTR *ServerPrincName, ULONG *AuthnLevel, ULONG *AuthnSvc, ULONG *AuthzSvc, ULONG Flags)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingInqAuthClientExW (RPC_BINDING_HANDLE ClientBinding, RPC_AUTHZ_HANDLE *Privs, RPC_WSTR *ServerPrincName, ULONG *AuthnLevel, ULONG *AuthnSvc, ULONG *AuthzSvc, ULONG Flags)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcCancelThread (void *)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcCancelThreadEx (void *, LONG)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcImpersonateClient (RPC_BINDING_HANDLE Binding)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcNetworkIsProtseqValidA (RPC_CSTR protseq)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcNetworkIsProtseqValidW (RPC_WSTR protseq)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcNetworkInqProtseqsA (RPC_PROTSEQ_VECTORA **protseqs)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcNetworkInqProtseqsW (RPC_PROTSEQ_VECTORW **protseqs)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcProtseqVectorFreeA (RPC_PROTSEQ_VECTORA **protseqs)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcProtseqVectorFreeW (RPC_PROTSEQ_VECTORW **protseqs)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcRevertToSelf (void)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcRevertToSelfEx (RPC_BINDING_HANDLE Binding)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcStringFreeA (RPC_CSTR *String)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcStringFreeW (RPC_WSTR *String)
 
RPCRTAPI RPC_STATUS RPC_ENTRY UuidToStringA (UUID *Uuid, RPC_CSTR *StringUuid)
 
RPCRTAPI RPC_STATUS RPC_ENTRY UuidToStringW (UUID *Uuid, RPC_WSTR *StringUuid)
 
RPCRTAPI RPC_STATUS RPC_ENTRY UuidFromStringA (RPC_CSTR StringUuid, UUID *Uuid)
 
RPCRTAPI RPC_STATUS RPC_ENTRY UuidFromStringW (RPC_WSTR StringUuid, UUID *Uuid)
 
RPCRTAPI RPC_STATUS RPC_ENTRY UuidCreate (UUID *Uuid)
 
RPCRTAPI RPC_STATUS RPC_ENTRY UuidCreateSequential (UUID *Uuid)
 
RPCRTAPI RPC_STATUS RPC_ENTRY UuidCreateNil (UUID *Uuid)
 
RPCRTAPI signed int RPC_ENTRY UuidCompare (UUID *Uuid1, UUID *Uuid2, RPC_STATUS *Status_)
 
RPCRTAPI int RPC_ENTRY UuidEqual (UUID *Uuid1, UUID *Uuid2, RPC_STATUS *Status_)
 
RPCRTAPI unsigned short RPC_ENTRY UuidHash (UUID *Uuid, RPC_STATUS *Status_)
 
RPCRTAPI int RPC_ENTRY UuidIsNil (UUID *Uuid, RPC_STATUS *Status_)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerInqDefaultPrincNameA (ULONG AuthnSvc, RPC_CSTR *PrincName)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerInqDefaultPrincNameW (ULONG AuthnSvc, RPC_WSTR *PrincName)
 

Macro Definition Documentation

◆ _RPC_HTTP_TRANSPORT_CREDENTIALS_

#define _RPC_HTTP_TRANSPORT_CREDENTIALS_   WINELIB_NAME_AW(_RPC_HTTP_TRANSPORT_CREDENTIALS_)

Definition at line 302 of file rpcdce.h.

◆ _RPC_SECURITY_QOS_V2

#define _RPC_SECURITY_QOS_V2   WINELIB_NAME_AW(_RPC_SECURITY_QOS_V2_)

Definition at line 306 of file rpcdce.h.

◆ _SEC_WINNT_AUTH_IDENTITY

#define _SEC_WINNT_AUTH_IDENTITY   WINELIB_NAME_AW(_SEC_WINNT_AUTH_IDENTITY_)

Definition at line 296 of file rpcdce.h.

◆ DceErrorInqText

#define DceErrorInqText   WINELIB_NAME_AW(DceErrorInqText)

Definition at line 323 of file rpcdce.h.

◆ IN

#define IN

Definition at line 27 of file rpcdce.h.

◆ OPTIONAL

Definition at line 33 of file rpcdce.h.

◆ OUT

#define OUT

Definition at line 30 of file rpcdce.h.

◆ PRPC_HTTP_TRANSPORT_CREDENTIALS_

#define PRPC_HTTP_TRANSPORT_CREDENTIALS_   WINELIB_NAME_AW(PRPC_HTTP_TRANSPORT_CREDENTIALS_)

Definition at line 301 of file rpcdce.h.

◆ PRPC_SECURITY_QOS_V2

#define PRPC_SECURITY_QOS_V2   WINELIB_NAME_AW(PRPC_SECURITY_QOS_V2_)

Definition at line 305 of file rpcdce.h.

◆ PSEC_WINNT_AUTH_IDENTITY

#define PSEC_WINNT_AUTH_IDENTITY   WINELIB_NAME_AW(PSEC_WINNT_AUTH_IDENTITY_)

Definition at line 298 of file rpcdce.h.

◆ rpc_binding_handle_t

#define rpc_binding_handle_t   RPC_BINDING_HANDLE

Definition at line 52 of file rpcdce.h.

◆ rpc_binding_vector_t

#define rpc_binding_vector_t   RPC_BINDING_VECTOR

Definition at line 60 of file rpcdce.h.

◆ RPC_C_AUTHN_DCE_PRIVATE

#define RPC_C_AUTHN_DCE_PRIVATE   1

Definition at line 154 of file rpcdce.h.

◆ RPC_C_AUTHN_DCE_PUBLIC

#define RPC_C_AUTHN_DCE_PUBLIC   2

Definition at line 155 of file rpcdce.h.

◆ RPC_C_AUTHN_DEC_PUBLIC

#define RPC_C_AUTHN_DEC_PUBLIC   4

Definition at line 156 of file rpcdce.h.

◆ RPC_C_AUTHN_DEFAULT

#define RPC_C_AUTHN_DEFAULT   0xffffffff

Definition at line 165 of file rpcdce.h.

◆ RPC_C_AUTHN_DIGEST

#define RPC_C_AUTHN_DIGEST   21

Definition at line 163 of file rpcdce.h.

◆ RPC_C_AUTHN_DPA

#define RPC_C_AUTHN_DPA   17

Definition at line 161 of file rpcdce.h.

◆ RPC_C_AUTHN_GSS_KERBEROS

#define RPC_C_AUTHN_GSS_KERBEROS   16

Definition at line 160 of file rpcdce.h.

◆ RPC_C_AUTHN_GSS_NEGOTIATE

#define RPC_C_AUTHN_GSS_NEGOTIATE   9

Definition at line 157 of file rpcdce.h.

◆ RPC_C_AUTHN_GSS_SCHANNEL

#define RPC_C_AUTHN_GSS_SCHANNEL   14

Definition at line 159 of file rpcdce.h.

◆ RPC_C_AUTHN_INFO_TYPE_HTTP

#define RPC_C_AUTHN_INFO_TYPE_HTTP   1

Definition at line 195 of file rpcdce.h.

◆ RPC_C_AUTHN_LEVEL_CALL

#define RPC_C_AUTHN_LEVEL_CALL   3

Definition at line 148 of file rpcdce.h.

◆ RPC_C_AUTHN_LEVEL_CONNECT

#define RPC_C_AUTHN_LEVEL_CONNECT   2

Definition at line 147 of file rpcdce.h.

◆ RPC_C_AUTHN_LEVEL_DEFAULT

#define RPC_C_AUTHN_LEVEL_DEFAULT   0

Definition at line 145 of file rpcdce.h.

◆ RPC_C_AUTHN_LEVEL_NONE

#define RPC_C_AUTHN_LEVEL_NONE   1

Definition at line 146 of file rpcdce.h.

◆ RPC_C_AUTHN_LEVEL_PKT

#define RPC_C_AUTHN_LEVEL_PKT   4

Definition at line 149 of file rpcdce.h.

◆ RPC_C_AUTHN_LEVEL_PKT_INTEGRITY

#define RPC_C_AUTHN_LEVEL_PKT_INTEGRITY   5

Definition at line 150 of file rpcdce.h.

◆ RPC_C_AUTHN_LEVEL_PKT_PRIVACY

#define RPC_C_AUTHN_LEVEL_PKT_PRIVACY   6

Definition at line 151 of file rpcdce.h.

◆ RPC_C_AUTHN_MQ

#define RPC_C_AUTHN_MQ   100

Definition at line 164 of file rpcdce.h.

◆ RPC_C_AUTHN_MSN

#define RPC_C_AUTHN_MSN   18

Definition at line 162 of file rpcdce.h.

◆ RPC_C_AUTHN_NONE

#define RPC_C_AUTHN_NONE   0

Definition at line 153 of file rpcdce.h.

◆ RPC_C_AUTHN_WINNT

#define RPC_C_AUTHN_WINNT   10

Definition at line 158 of file rpcdce.h.

◆ RPC_C_AUTHZ_DCE

#define RPC_C_AUTHZ_DCE   2

Definition at line 169 of file rpcdce.h.

◆ RPC_C_AUTHZ_DEFAULT

#define RPC_C_AUTHZ_DEFAULT   0xffffffff

Definition at line 170 of file rpcdce.h.

◆ RPC_C_AUTHZ_NAME

#define RPC_C_AUTHZ_NAME   1

Definition at line 168 of file rpcdce.h.

◆ RPC_C_AUTHZ_NONE

#define RPC_C_AUTHZ_NONE   0

Definition at line 167 of file rpcdce.h.

◆ RPC_C_BIND_TO_ALL_NICS

#define RPC_C_BIND_TO_ALL_NICS   0x1

Definition at line 131 of file rpcdce.h.

◆ RPC_C_BINDING_DEFAULT_TIMEOUT

#define RPC_C_BINDING_DEFAULT_TIMEOUT   5

Definition at line 117 of file rpcdce.h.

◆ RPC_C_BINDING_INFINITE_TIMEOUT

#define RPC_C_BINDING_INFINITE_TIMEOUT   10

Definition at line 115 of file rpcdce.h.

◆ RPC_C_BINDING_MAX_TIMEOUT

#define RPC_C_BINDING_MAX_TIMEOUT   9

Definition at line 118 of file rpcdce.h.

◆ RPC_C_BINDING_MIN_TIMEOUT

#define RPC_C_BINDING_MIN_TIMEOUT   0

Definition at line 116 of file rpcdce.h.

◆ RPC_C_CANCEL_INFINITE_TIMEOUT

#define RPC_C_CANCEL_INFINITE_TIMEOUT   -1

Definition at line 120 of file rpcdce.h.

◆ RPC_C_DONT_FAIL

#define RPC_C_DONT_FAIL   0x4

Definition at line 134 of file rpcdce.h.

◆ RPC_C_EP_ALL_ELTS

#define RPC_C_EP_ALL_ELTS   0

Definition at line 104 of file rpcdce.h.

◆ RPC_C_EP_MATCH_BY_BOTH

#define RPC_C_EP_MATCH_BY_BOTH   3

Definition at line 107 of file rpcdce.h.

◆ RPC_C_EP_MATCH_BY_IF

#define RPC_C_EP_MATCH_BY_IF   1

Definition at line 105 of file rpcdce.h.

◆ RPC_C_EP_MATCH_BY_OBJ

#define RPC_C_EP_MATCH_BY_OBJ   2

Definition at line 106 of file rpcdce.h.

◆ RPC_C_HTTP_AUTHN_SCHEME_BASIC

#define RPC_C_HTTP_AUTHN_SCHEME_BASIC   0x01

Definition at line 205 of file rpcdce.h.

◆ RPC_C_HTTP_AUTHN_SCHEME_DIGEST

#define RPC_C_HTTP_AUTHN_SCHEME_DIGEST   0x08

Definition at line 208 of file rpcdce.h.

◆ RPC_C_HTTP_AUTHN_SCHEME_NEGOTIATE

#define RPC_C_HTTP_AUTHN_SCHEME_NEGOTIATE   0x10

Definition at line 209 of file rpcdce.h.

◆ RPC_C_HTTP_AUTHN_SCHEME_NTLM

#define RPC_C_HTTP_AUTHN_SCHEME_NTLM   0x02

Definition at line 206 of file rpcdce.h.

◆ RPC_C_HTTP_AUTHN_SCHEME_PASSPORT

#define RPC_C_HTTP_AUTHN_SCHEME_PASSPORT   0x04

Definition at line 207 of file rpcdce.h.

◆ RPC_C_HTTP_AUTHN_TARGET_PROXY

#define RPC_C_HTTP_AUTHN_TARGET_PROXY   2

Definition at line 203 of file rpcdce.h.

◆ RPC_C_HTTP_AUTHN_TARGET_SERVER

#define RPC_C_HTTP_AUTHN_TARGET_SERVER   1

Definition at line 202 of file rpcdce.h.

◆ RPC_C_HTTP_FLAG_USE_FIRST_AUTH_SCHEME

#define RPC_C_HTTP_FLAG_USE_FIRST_AUTH_SCHEME   0x2

Definition at line 199 of file rpcdce.h.

◆ RPC_C_HTTP_FLAG_USE_SSL

#define RPC_C_HTTP_FLAG_USE_SSL   0x1

Definition at line 198 of file rpcdce.h.

◆ RPC_C_IMP_LEVEL_ANONYMOUS

#define RPC_C_IMP_LEVEL_ANONYMOUS   1

Definition at line 174 of file rpcdce.h.

◆ RPC_C_IMP_LEVEL_DEFAULT

#define RPC_C_IMP_LEVEL_DEFAULT   0

Definition at line 173 of file rpcdce.h.

◆ RPC_C_IMP_LEVEL_DELEGATE

#define RPC_C_IMP_LEVEL_DELEGATE   4

Definition at line 177 of file rpcdce.h.

◆ RPC_C_IMP_LEVEL_IDENTIFY

#define RPC_C_IMP_LEVEL_IDENTIFY   2

Definition at line 175 of file rpcdce.h.

◆ RPC_C_IMP_LEVEL_IMPERSONATE

#define RPC_C_IMP_LEVEL_IMPERSONATE   3

Definition at line 176 of file rpcdce.h.

◆ RPC_C_LISTEN_MAX_CALLS_DEFAULT

#define RPC_C_LISTEN_MAX_CALLS_DEFAULT   1234

Definition at line 122 of file rpcdce.h.

◆ RPC_C_MQ_AUTHN_LEVEL_NONE

#define RPC_C_MQ_AUTHN_LEVEL_NONE   0x0000

Definition at line 141 of file rpcdce.h.

◆ RPC_C_MQ_AUTHN_LEVEL_PKT_INTEGRITY

#define RPC_C_MQ_AUTHN_LEVEL_PKT_INTEGRITY   0x0008

Definition at line 142 of file rpcdce.h.

◆ RPC_C_MQ_AUTHN_LEVEL_PKT_PRIVACY

#define RPC_C_MQ_AUTHN_LEVEL_PKT_PRIVACY   0x0010

Definition at line 143 of file rpcdce.h.

◆ RPC_C_MQ_CLEAR_ON_OPEN

#define RPC_C_MQ_CLEAR_ON_OPEN   0x0002

Definition at line 139 of file rpcdce.h.

◆ RPC_C_MQ_PERMANENT

#define RPC_C_MQ_PERMANENT   0x0001

Definition at line 138 of file rpcdce.h.

◆ RPC_C_MQ_TEMPORARY

#define RPC_C_MQ_TEMPORARY   0x0000

Definition at line 137 of file rpcdce.h.

◆ RPC_C_MQ_USE_EXISTING_SECURITY

#define RPC_C_MQ_USE_EXISTING_SECURITY   0x0004

Definition at line 140 of file rpcdce.h.

◆ RPC_C_PROTSEQ_MAX_REQS_DEFAULT

#define RPC_C_PROTSEQ_MAX_REQS_DEFAULT   10

Definition at line 123 of file rpcdce.h.

◆ RPC_C_QOS_CAPABILITIES_ANY_AUTHORITY

#define RPC_C_QOS_CAPABILITIES_ANY_AUTHORITY   0x4

Definition at line 187 of file rpcdce.h.

◆ RPC_C_QOS_CAPABILITIES_DEFAULT

#define RPC_C_QOS_CAPABILITIES_DEFAULT   0x0

Definition at line 184 of file rpcdce.h.

◆ RPC_C_QOS_CAPABILITIES_MAKE_FULLSIC

#define RPC_C_QOS_CAPABILITIES_MAKE_FULLSIC   0x2

Definition at line 186 of file rpcdce.h.

◆ RPC_C_QOS_CAPABILITIES_MUTUAL_AUTH

#define RPC_C_QOS_CAPABILITIES_MUTUAL_AUTH   0x1

Definition at line 185 of file rpcdce.h.

◆ RPC_C_QOS_IDENTITY_DYNAMIC

#define RPC_C_QOS_IDENTITY_DYNAMIC   1

Definition at line 181 of file rpcdce.h.

◆ RPC_C_QOS_IDENTITY_STATIC

#define RPC_C_QOS_IDENTITY_STATIC   0

Definition at line 180 of file rpcdce.h.

◆ RPC_C_SECURITY_QOS_VERSION

#define RPC_C_SECURITY_QOS_VERSION   1

Definition at line 190 of file rpcdce.h.

◆ RPC_C_SECURITY_QOS_VERSION_1

#define RPC_C_SECURITY_QOS_VERSION_1   1

Definition at line 191 of file rpcdce.h.

◆ RPC_C_SECURITY_QOS_VERSION_2

#define RPC_C_SECURITY_QOS_VERSION_2   2

Definition at line 192 of file rpcdce.h.

◆ RPC_C_USE_INTERNET_PORT

#define RPC_C_USE_INTERNET_PORT   0x1

Definition at line 132 of file rpcdce.h.

◆ RPC_C_USE_INTRANET_PORT

#define RPC_C_USE_INTRANET_PORT   0x2

Definition at line 133 of file rpcdce.h.

◆ RPC_C_VERS_ALL

#define RPC_C_VERS_ALL   1

Definition at line 109 of file rpcdce.h.

◆ RPC_C_VERS_COMPATIBLE

#define RPC_C_VERS_COMPATIBLE   2

Definition at line 110 of file rpcdce.h.

◆ RPC_C_VERS_EXACT

#define RPC_C_VERS_EXACT   3

Definition at line 111 of file rpcdce.h.

◆ RPC_C_VERS_MAJOR_ONLY

#define RPC_C_VERS_MAJOR_ONLY   4

Definition at line 112 of file rpcdce.h.

◆ RPC_C_VERS_UPTO

#define RPC_C_VERS_UPTO   5

Definition at line 113 of file rpcdce.h.

◆ RPC_HTTP_TRANSPORT_CREDENTIALS_

#define RPC_HTTP_TRANSPORT_CREDENTIALS_   WINELIB_NAME_AW(RPC_HTTP_TRANSPORT_CREDENTIALS_)

Definition at line 300 of file rpcdce.h.

◆ RPC_IF_ALLOW_CALLBACKS_WITH_NO_AUTH

#define RPC_IF_ALLOW_CALLBACKS_WITH_NO_AUTH   0x10

Definition at line 317 of file rpcdce.h.

◆ RPC_IF_ALLOW_LOCAL_ONLY

#define RPC_IF_ALLOW_LOCAL_ONLY   0x20

Definition at line 318 of file rpcdce.h.

◆ RPC_IF_ALLOW_SECURE_ONLY

#define RPC_IF_ALLOW_SECURE_ONLY   0x08

Definition at line 316 of file rpcdce.h.

◆ RPC_IF_ALLOW_UNKNOWN_AUTHORITY

#define RPC_IF_ALLOW_UNKNOWN_AUTHORITY   0x04

Definition at line 315 of file rpcdce.h.

◆ RPC_IF_AUTOLISTEN

#define RPC_IF_AUTOLISTEN   0x01

Definition at line 313 of file rpcdce.h.

◆ RPC_IF_OLE

#define RPC_IF_OLE   0x02

Definition at line 314 of file rpcdce.h.

◆ RPC_IF_SEC_NO_CACHE

#define RPC_IF_SEC_NO_CACHE   0x40

Definition at line 319 of file rpcdce.h.

◆ RPC_MGR_EPV

#define RPC_MGR_EPV   void

Definition at line 53 of file rpcdce.h.

◆ RPC_PROTSEQ_HTTP

#define RPC_PROTSEQ_HTTP   0x4

Definition at line 128 of file rpcdce.h.

◆ RPC_PROTSEQ_LRPC

#define RPC_PROTSEQ_LRPC   0x3

Definition at line 127 of file rpcdce.h.

◆ RPC_PROTSEQ_NMP

#define RPC_PROTSEQ_NMP   0x2

Definition at line 126 of file rpcdce.h.

◆ RPC_PROTSEQ_TCP

#define RPC_PROTSEQ_TCP   0x1

Definition at line 125 of file rpcdce.h.

◆ RPC_SECURITY_QOS_V2

#define RPC_SECURITY_QOS_V2   WINELIB_NAME_AW(RPC_SECURITY_QOS_V2_)

Definition at line 304 of file rpcdce.h.

◆ RpcBindingFromStringBinding

#define RpcBindingFromStringBinding   WINELIB_NAME_AW(RpcBindingFromStringBinding)

Definition at line 355 of file rpcdce.h.

◆ RpcBindingInqAuthClient

#define RpcBindingInqAuthClient   WINELIB_NAME_AW(RpcBindingInqAuthClient)

Definition at line 548 of file rpcdce.h.

◆ RpcBindingInqAuthClientEx

#define RpcBindingInqAuthClientEx   WINELIB_NAME_AW(RpcBindingInqAuthClientEx)

Definition at line 559 of file rpcdce.h.

◆ RpcBindingInqAuthInfo

#define RpcBindingInqAuthInfo   WINELIB_NAME_AW(RpcBindingInqAuthInfo)

Definition at line 537 of file rpcdce.h.

◆ RpcBindingInqAuthInfoEx

#define RpcBindingInqAuthInfoEx   WINELIB_NAME_AW(RpcBindingInqAuthInfoEx)

Definition at line 528 of file rpcdce.h.

◆ RpcBindingSetAuthInfo

#define RpcBindingSetAuthInfo   WINELIB_NAME_AW(RpcBindingSetAuthInfo)

Definition at line 517 of file rpcdce.h.

◆ RpcBindingSetAuthInfoEx

#define RpcBindingSetAuthInfoEx   WINELIB_NAME_AW(RpcBindingSetAuthInfoEx)

Definition at line 508 of file rpcdce.h.

◆ RpcBindingToStringBinding

#define RpcBindingToStringBinding   WINELIB_NAME_AW(RpcBindingToStringBinding)

Definition at line 361 of file rpcdce.h.

◆ RpcEpRegister

#define RpcEpRegister   WINELIB_NAME_AW(RpcEpRegister)

Definition at line 391 of file rpcdce.h.

◆ RpcEpRegisterNoReplace

#define RpcEpRegisterNoReplace   WINELIB_NAME_AW(RpcEpRegisterNoReplace)

Definition at line 399 of file rpcdce.h.

◆ RpcNetworkInqProtseqs

#define RpcNetworkInqProtseqs   WINELIB_NAME_AW(RpcNetworkInqProtseqs)

Definition at line 577 of file rpcdce.h.

◆ RpcNetworkIsProtseqValid

#define RpcNetworkIsProtseqValid   WINELIB_NAME_AW(RpcNetworkIsProtseqValid)

Definition at line 571 of file rpcdce.h.

◆ RpcProtseqVectorFree

#define RpcProtseqVectorFree   WINELIB_NAME_AW(RpcProtseqVectorFree)

Definition at line 583 of file rpcdce.h.

◆ RpcServerInqDefaultPrincName

#define RpcServerInqDefaultPrincName   WINELIB_NAME_AW(RpcServerInqDefaultPrincName)

Definition at line 627 of file rpcdce.h.

◆ RpcServerRegisterAuthInfo

#define RpcServerRegisterAuthInfo   WINELIB_NAME_AW(RpcServerRegisterAuthInfo)

Definition at line 497 of file rpcdce.h.

◆ RpcServerUseProtseq

#define RpcServerUseProtseq   WINELIB_NAME_AW(RpcServerUseProtseq)

Definition at line 475 of file rpcdce.h.

◆ RpcServerUseProtseqEp

#define RpcServerUseProtseqEp   WINELIB_NAME_AW(RpcServerUseProtseqEp)

Definition at line 481 of file rpcdce.h.

◆ RpcServerUseProtseqEpEx

#define RpcServerUseProtseqEpEx   WINELIB_NAME_AW(RpcServerUseProtseqEpEx)

Definition at line 489 of file rpcdce.h.

◆ RpcStringBindingCompose

#define RpcStringBindingCompose   WINELIB_NAME_AW(RpcStringBindingCompose)

Definition at line 372 of file rpcdce.h.

◆ RpcStringBindingParse

#define RpcStringBindingParse   WINELIB_NAME_AW(RpcStringBindingParse)

Definition at line 380 of file rpcdce.h.

◆ RpcStringFree

#define RpcStringFree   WINELIB_NAME_AW(RpcStringFree)

Definition at line 594 of file rpcdce.h.

◆ SEC_WINNT_AUTH_IDENTITY

#define SEC_WINNT_AUTH_IDENTITY   WINELIB_NAME_AW(SEC_WINNT_AUTH_IDENTITY_)

Definition at line 297 of file rpcdce.h.

◆ SEC_WINNT_AUTH_IDENTITY_ANSI

#define SEC_WINNT_AUTH_IDENTITY_ANSI   0x1

Definition at line 309 of file rpcdce.h.

◆ SEC_WINNT_AUTH_IDENTITY_UNICODE

#define SEC_WINNT_AUTH_IDENTITY_UNICODE   0x2

Definition at line 310 of file rpcdce.h.

◆ UUID_DEFINED

#define UUID_DEFINED

Definition at line 41 of file rpcdce.h.

◆ uuid_vector_t

#define uuid_vector_t   UUID_VECTOR

Definition at line 67 of file rpcdce.h.

◆ UuidFromString

#define UuidFromString   WINELIB_NAME_AW(UuidFromString)

Definition at line 606 of file rpcdce.h.

◆ UuidToString

#define UuidToString   WINELIB_NAME_AW(UuidToString)

Definition at line 600 of file rpcdce.h.

Typedef Documentation

◆ handle_t

Definition at line 51 of file rpcdce.h.

◆ PRPC_HTTP_TRANSPORT_CREDENTIALS_A

◆ PRPC_HTTP_TRANSPORT_CREDENTIALS_W

◆ PRPC_POLICY

◆ PRPC_SECURITY_QOS

◆ PRPC_SECURITY_QOS_V2_A

◆ PRPC_SECURITY_QOS_V2_W

◆ PSEC_WINNT_AUTH_IDENTITY_A

◆ PSEC_WINNT_AUTH_IDENTITY_W

◆ RPC_AUTH_IDENTITY_HANDLE

Definition at line 47 of file rpcdce.h.

◆ RPC_AUTH_KEY_RETRIEVAL_FN

typedef void(__RPC_USER * RPC_AUTH_KEY_RETRIEVAL_FN) (void *, RPC_WSTR, ULONG, void **, RPC_STATUS *)

Definition at line 212 of file rpcdce.h.

◆ RPC_AUTHZ_HANDLE

Definition at line 48 of file rpcdce.h.

◆ RPC_BINDING_HANDLE

Definition at line 50 of file rpcdce.h.

◆ RPC_BINDING_VECTOR

◆ RPC_CSTR

Definition at line 45 of file rpcdce.h.

◆ RPC_EP_INQ_HANDLE

Definition at line 102 of file rpcdce.h.

◆ RPC_HTTP_TRANSPORT_CREDENTIALS_A

◆ RPC_HTTP_TRANSPORT_CREDENTIALS_W

◆ RPC_IF_CALLBACK_FN

typedef RPC_STATUS RPC_ENTRY RPC_IF_CALLBACK_FN(RPC_IF_HANDLE InterfaceUuid, void *Context)

Definition at line 211 of file rpcdce.h.

◆ RPC_IF_HANDLE

typedef void* RPC_IF_HANDLE

Definition at line 49 of file rpcdce.h.

◆ RPC_IF_ID

◆ RPC_MGMT_AUTHORIZATION_FN

typedef int(__RPC_API * RPC_MGMT_AUTHORIZATION_FN) (RPC_BINDING_HANDLE, ULONG, RPC_STATUS *)

Definition at line 414 of file rpcdce.h.

◆ RPC_POLICY

◆ RPC_PROTSEQ_VECTORA

◆ RPC_PROTSEQ_VECTORW

◆ RPC_SECURITY_QOS

◆ RPC_SECURITY_QOS_V2_A

◆ RPC_SECURITY_QOS_V2_W

◆ RPC_WSTR

Definition at line 46 of file rpcdce.h.

◆ SEC_WINNT_AUTH_IDENTITY_A

◆ SEC_WINNT_AUTH_IDENTITY_W

◆ UUID

typedef GUID UUID

Definition at line 42 of file rpcdce.h.

◆ UUID_VECTOR

Function Documentation

◆ DceErrorInqTextA()

RPC_STATUS RPC_ENTRY DceErrorInqTextA ( RPC_STATUS  e,
RPC_CSTR  buffer 
)

Definition at line 728 of file rpcrt4_main.c.

729{
731 WCHAR bufferW [MAX_RPC_ERROR_TEXT];
732 if ((status = DceErrorInqTextW (e, bufferW)) == RPC_S_OK)
733 {
735 NULL, NULL))
736 {
737 ERR ("Failed to translate error\n");
739 }
740 }
741 return status;
742}
#define ERR(fmt,...)
Definition: precomp.h:57
#define NULL
Definition: types.h:112
#define CP_ACP
Definition: compat.h:109
#define WideCharToMultiByte
Definition: compat.h:111
GLuint buffer
Definition: glext.h:5915
#define e
Definition: ke_i.h:82
#define RPC_S_INVALID_ARG
Definition: rpcnterr.h:23
#define RPC_S_OK
Definition: rpcnterr.h:22
RPC_STATUS RPC_ENTRY DceErrorInqTextW(RPC_STATUS e, RPC_WSTR buffer)
Definition: rpcrt4_main.c:705
#define MAX_RPC_ERROR_TEXT
Definition: rpcrt4_main.c:691
long RPC_STATUS
Definition: rpc.h:48
Definition: ps.c:97
__wchar_t WCHAR
Definition: xmlstorage.h:180
char * LPSTR
Definition: xmlstorage.h:182

Referenced by test_DceErrorInqTextA().

◆ DceErrorInqTextW()

RPC_STATUS RPC_ENTRY DceErrorInqTextW ( RPC_STATUS  e,
RPC_WSTR  buffer 
)

Definition at line 705 of file rpcrt4_main.c.

706{
707 DWORD count;
711 if (!count)
712 {
716 if (!count)
717 {
718 ERR ("Failed to translate error\n");
719 return RPC_S_INVALID_ARG;
720 }
721 }
722 return RPC_S_OK;
723}
DWORD WINAPI FormatMessageW(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, LPWSTR lpBuffer, DWORD nSize, __ms_va_list *args)
Definition: format_msg.c:583
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define FORMAT_MESSAGE_IGNORE_INSERTS
Definition: winbase.h:397
#define FORMAT_MESSAGE_FROM_SYSTEM
Definition: winbase.h:400
#define RPC_S_NOT_RPC_ERROR
Definition: winerror.h:1487

Referenced by DceErrorInqTextA().

◆ RpcBindingCopy()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingCopy ( RPC_BINDING_HANDLE  SourceBinding,
RPC_BINDING_HANDLE DestinationBinding 
)

Definition at line 971 of file rpc_binding.c.

974{
975 RpcBinding *DestBinding;
976 RpcBinding *SrcBinding = SourceBinding;
978
979 TRACE("(%p, %p)\n", SourceBinding, DestinationBinding);
980
981 status = RPCRT4_AllocBinding(&DestBinding, SrcBinding->server);
982 if (status != RPC_S_OK) return status;
983
984 DestBinding->ObjectUuid = SrcBinding->ObjectUuid;
985 DestBinding->BlockingFn = SrcBinding->BlockingFn;
986 DestBinding->Protseq = strdup(SrcBinding->Protseq);
987 DestBinding->NetworkAddr = strdup(SrcBinding->NetworkAddr);
988 DestBinding->Endpoint = strdup(SrcBinding->Endpoint);
989 DestBinding->NetworkOptions = wcsdup(SrcBinding->NetworkOptions);
990 DestBinding->CookieAuth = wcsdup(SrcBinding->CookieAuth);
991 if (SrcBinding->Assoc) SrcBinding->Assoc->refs++;
992 DestBinding->Assoc = SrcBinding->Assoc;
993
994 if (SrcBinding->AuthInfo) RpcAuthInfo_AddRef(SrcBinding->AuthInfo);
995 DestBinding->AuthInfo = SrcBinding->AuthInfo;
996 if (SrcBinding->QOS) RpcQualityOfService_AddRef(SrcBinding->QOS);
997 DestBinding->QOS = SrcBinding->QOS;
998
999 *DestinationBinding = DestBinding;
1000 return RPC_S_OK;
1001}
static RPC_STATUS RPCRT4_AllocBinding(RpcBinding **Binding, BOOL server)
Definition: rpc_binding.c:92
ULONG RpcAuthInfo_AddRef(RpcAuthInfo *AuthInfo)
Definition: rpc_binding.c:1165
ULONG RpcQualityOfService_AddRef(RpcQualityOfService *qos)
Definition: rpc_binding.c:1342
_Check_return_ _CRTIMP char *__cdecl strdup(_In_opt_z_ const char *_Src)
_Check_return_ _CRTIMP wchar_t *__cdecl wcsdup(_In_z_ const wchar_t *_Str)
#define TRACE(s)
Definition: solgame.cpp:4
RPC_BLOCKING_FN BlockingFn
Definition: rpc_binding.h:135
LPSTR NetworkAddr
Definition: rpc_binding.h:132
LPWSTR NetworkOptions
Definition: rpc_binding.h:134
LPWSTR CookieAuth
Definition: rpc_binding.h:143
RpcAuthInfo * AuthInfo
Definition: rpc_binding.h:141
LPSTR Endpoint
Definition: rpc_binding.h:133
LPSTR Protseq
Definition: rpc_binding.h:131
struct _RpcAssoc * Assoc
Definition: rpc_binding.h:138
UUID ObjectUuid
Definition: rpc_binding.h:130
RpcQualityOfService * QOS
Definition: rpc_binding.h:142

Referenced by get_epm_handle_client(), and ndr_update_context_handle().

◆ RpcBindingFree()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingFree ( RPC_BINDING_HANDLE Binding)

Definition at line 769 of file rpc_binding.c.

770{
772 TRACE("(%p) = %p\n", Binding, *Binding);
773 if (*Binding)
775 else
777 if (status == RPC_S_OK) *Binding = NULL;
778 return status;
779}
RPC_STATUS RPCRT4_ReleaseBinding(RpcBinding *Binding)
Definition: rpc_binding.c:237
#define RPC_S_INVALID_BINDING
Definition: winerror.h:1369

Referenced by ATSVC_HANDLE_unbind(), BROWSER_IDENTIFY_HANDLE_unbind(), client(), ClientRpcChannelBuffer_Release(), CreateJob(), CreateProcessWithLogonW(), DNSRSLVR_HANDLE_unbind(), DsSetupUnbind(), epm_register(), EVENTLOG_HANDLE_A_unbind(), EVENTLOG_HANDLE_W_unbind(), get_irot_handle(), listen_test_client_thread(), LOGONSRV_HANDLE_unbind(), main(), MSI_FreePackage(), ndr_update_context_handle(), NetpUnbind(), PDHCP_SERVER_NAME_unbind(), PLSAPR_SERVER_NAME_unbind(), PnpUnbindRpc(), PREGISTRY_SERVER_NAME_unbind(), PSAMPR_SERVER_NAME_unbind(), RPC_CreateClientChannel(), RpcBindingVectorFree(), RpcEpResolveBinding(), RpcEpUnregister(), RpcSmDestroyClientContext(), RunningObjectTableImpl_Destroy(), s_context_handle_test(), ScDestroyStatusBinding(), SRVSVC_HANDLE_unbind(), SVCCTL_HANDLEA_unbind(), SVCCTL_HANDLEW_unbind(), test_endpoint_mapper(), test_ndr_buffer(), test_reconnect(), test_rpc_ncacn_ip_tcp(), test_RpcBindingFree(), test_RpcStringBindingFromBinding(), WINSPOOL_HANDLE_unbind(), WKSSVC_IDENTIFY_HANDLE_unbind(), WKSSVC_IMPERSONATE_HANDLE_unbind(), and WLANSVC_HANDLE_unbind().

◆ RpcBindingFromStringBindingA()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingFromStringBindingA ( RPC_CSTR  StringBinding,
RPC_BINDING_HANDLE Binding 
)

Definition at line 822 of file rpc_binding.c.

823{
826 RPC_CSTR ObjectUuid, Protseq, NetworkAddr, Endpoint, Options;
827 UUID Uuid;
828
829 TRACE("(%s,%p)\n", debugstr_a((char*)StringBinding), Binding);
830
831 ret = RpcStringBindingParseA(StringBinding, &ObjectUuid, &Protseq,
832 &NetworkAddr, &Endpoint, &Options);
833 if (ret != RPC_S_OK) return ret;
834
835 ret = UuidFromStringA(ObjectUuid, &Uuid);
836
837 if (ret == RPC_S_OK)
838 ret = RPCRT4_CreateBindingA(&bind, FALSE, (char*)Protseq);
839 if (ret == RPC_S_OK) {
841 if (ret == RPC_S_OK)
842 ret = RPCRT4_CompleteBindingA(bind, (char*)NetworkAddr, (char*)Endpoint, (char*)Options);
843
844 if (ret == RPC_S_OK)
846 else
848 }
849
851 RpcStringFreeA(&Endpoint);
852 RpcStringFreeA(&NetworkAddr);
853 RpcStringFreeA(&Protseq);
854 RpcStringFreeA(&ObjectUuid);
855
856 return ret;
857}
#define FALSE
Definition: types.h:117
return ret
Definition: mutex.c:146
#define debugstr_a
Definition: kernel32.h:31
RPC_STATUS WINAPI RpcStringBindingParseA(RPC_CSTR StringBinding, RPC_CSTR *ObjUuid, RPC_CSTR *Protseq, RPC_CSTR *NetworkAddr, RPC_CSTR *Endpoint, RPC_CSTR *Options)
Definition: rpc_binding.c:547
static RPC_STATUS RPCRT4_CreateBindingA(RpcBinding **Binding, BOOL server, LPCSTR Protseq)
Definition: rpc_binding.c:105
RPC_STATUS RPCRT4_SetBindingObject(RpcBinding *Binding, const UUID *ObjectUuid)
Definition: rpc_binding.c:207
static RPC_STATUS RPCRT4_CompleteBindingA(RpcBinding *Binding, LPCSTR NetworkAddr, LPCSTR Endpoint, LPCSTR NetworkOptions)
Definition: rpc_binding.c:131
I_RPC_HANDLE RPC_BINDING_HANDLE
Definition: rpcdce.h:50
unsigned char * RPC_CSTR
Definition: rpcdce.h:45
RPC_STATUS WINAPI RpcStringFreeA(RPC_CSTR *String)
Definition: rpcrt4_main.c:164
RPC_STATUS WINAPI UuidFromStringA(RPC_CSTR s, UUID *uuid)
Definition: rpcrt4_main.c:615
INT WSAAPI bind(IN SOCKET s, IN CONST struct sockaddr *name, IN INT namelen)
Definition: socklife.c:36
_In_ PWDFDEVICE_INIT _In_ PWDF_REMOVE_LOCK_OPTIONS Options
Definition: wdfdevice.h:3540

Referenced by client(), EVENTLOG_HANDLE_A_bind(), get_epm_handle_server(), listen_test_client_thread(), SVCCTL_HANDLEA_bind(), test_endpoint_mapper(), test_ndr_buffer(), test_reconnect(), test_rpc_ncacn_ip_tcp(), and test_RpcStringBindingFromBinding().

◆ RpcBindingFromStringBindingW()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingFromStringBindingW ( RPC_WSTR  StringBinding,
RPC_BINDING_HANDLE Binding 
)

Definition at line 862 of file rpc_binding.c.

863{
866 RPC_WSTR ObjectUuid, Protseq, NetworkAddr, Endpoint, Options;
867 UUID Uuid;
868
869 TRACE("(%s,%p)\n", debugstr_w(StringBinding), Binding);
870
871 ret = RpcStringBindingParseW(StringBinding, &ObjectUuid, &Protseq,
872 &NetworkAddr, &Endpoint, &Options);
873 if (ret != RPC_S_OK) return ret;
874
875 ret = UuidFromStringW(ObjectUuid, &Uuid);
876
877 if (ret == RPC_S_OK)
878 ret = RPCRT4_CreateBindingW(&bind, FALSE, Protseq);
879 if (ret == RPC_S_OK) {
881 if (ret == RPC_S_OK)
882 ret = RPCRT4_CompleteBindingW(bind, NetworkAddr, Endpoint, Options);
883
884 if (ret == RPC_S_OK)
886 else
888 }
889
891 RpcStringFreeW(&Endpoint);
892 RpcStringFreeW(&NetworkAddr);
893 RpcStringFreeW(&Protseq);
894 RpcStringFreeW(&ObjectUuid);
895
896 return ret;
897}
#define debugstr_w
Definition: kernel32.h:32
static RPC_STATUS RPCRT4_CreateBindingW(RpcBinding **Binding, BOOL server, LPCWSTR Protseq)
Definition: rpc_binding.c:118
RPC_STATUS WINAPI RpcStringBindingParseW(RPC_WSTR StringBinding, RPC_WSTR *ObjUuid, RPC_WSTR *Protseq, RPC_WSTR *NetworkAddr, RPC_WSTR *Endpoint, RPC_WSTR *Options)
Definition: rpc_binding.c:659
static RPC_STATUS RPCRT4_CompleteBindingW(RpcBinding *Binding, LPCWSTR NetworkAddr, LPCWSTR Endpoint, LPCWSTR NetworkOptions)
Definition: rpc_binding.c:159
unsigned short * RPC_WSTR
Definition: rpcdce.h:46
RPC_STATUS WINAPI RpcStringFreeW(RPC_WSTR *String)
Definition: rpcrt4_main.c:181
RPC_STATUS WINAPI UuidFromStringW(RPC_WSTR s, UUID *uuid)
Definition: rpcrt4_main.c:655

Referenced by __wine_msi_call_dll_function(), ATSVC_HANDLE_bind(), BROWSER_IDENTIFY_HANDLE_bind(), CreateProcessWithLogonW(), DNSRSLVR_HANDLE_bind(), DsSetupBind(), EVENTLOG_HANDLE_W_bind(), get_irot_handle(), LOGONSRV_HANDLE_bind(), NetpBind(), PDHCP_SERVER_NAME_bind(), PLSAPR_SERVER_NAME_bind(), PnpBindRpc(), PREGISTRY_SERVER_NAME_bind(), PSAMPR_SERVER_NAME_bind(), RPC_CreateClientChannel(), ScCreateStatusBinding(), SRVSVC_HANDLE_bind(), SVCCTL_HANDLEW_bind(), WINSPOOL_HANDLE_bind(), WKSSVC_IDENTIFY_HANDLE_bind(), WKSSVC_IMPERSONATE_HANDLE_bind(), and WLANSVC_HANDLE_bind().

◆ RpcBindingInqAuthClientA()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingInqAuthClientA ( RPC_BINDING_HANDLE  ClientBinding,
RPC_AUTHZ_HANDLE Privs,
RPC_CSTR ServerPrincName,
ULONG AuthnLevel,
ULONG AuthnSvc,
ULONG AuthzSvc 
)

Definition at line 1554 of file rpc_binding.c.

1557{
1558 return RpcBindingInqAuthClientExA(ClientBinding, Privs, ServerPrincName, AuthnLevel,
1559 AuthnSvc, AuthzSvc, 0);
1560}
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingInqAuthClientExA(RPC_BINDING_HANDLE ClientBinding, RPC_AUTHZ_HANDLE *Privs, RPC_CSTR *ServerPrincName, ULONG *AuthnLevel, ULONG *AuthnSvc, ULONG *AuthzSvc, ULONG Flags)
Definition: rpc_binding.c:1578

Referenced by s_authinfo_test().

◆ RpcBindingInqAuthClientExA()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingInqAuthClientExA ( RPC_BINDING_HANDLE  ClientBinding,
RPC_AUTHZ_HANDLE Privs,
RPC_CSTR ServerPrincName,
ULONG AuthnLevel,
ULONG AuthnSvc,
ULONG AuthzSvc,
ULONG  Flags 
)

Definition at line 1578 of file rpc_binding.c.

1581{
1583 RPC_WSTR principal;
1584
1585 TRACE("%p %p %p %p %p %p 0x%lx\n", ClientBinding, Privs, ServerPrincName, AuthnLevel,
1586 AuthnSvc, AuthzSvc, Flags);
1587
1588 status = RpcBindingInqAuthClientExW(ClientBinding, Privs, ServerPrincName ? &principal : NULL,
1589 AuthnLevel, AuthnSvc, AuthzSvc, Flags);
1590 if (status == RPC_S_OK && ServerPrincName)
1591 {
1592 *ServerPrincName = (RPC_CSTR)RPCRT4_strdupWtoA(principal);
1593 if (!*ServerPrincName && principal) status = RPC_S_OUT_OF_MEMORY;
1594 RpcStringFreeW(&principal);
1595 }
1596
1597 return status;
1598}
LPSTR RPCRT4_strdupWtoA(LPCWSTR src)
Definition: rpc_binding.c:46
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingInqAuthClientExW(RPC_BINDING_HANDLE ClientBinding, RPC_AUTHZ_HANDLE *Privs, RPC_WSTR *ServerPrincName, ULONG *AuthnLevel, ULONG *AuthnSvc, ULONG *AuthzSvc, ULONG Flags)
Definition: rpc_binding.c:1604
#define RPC_S_OUT_OF_MEMORY
Definition: rpcnterr.h:24
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170

Referenced by RpcBindingInqAuthClientA(), and s_authinfo_test().

◆ RpcBindingInqAuthClientExW()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingInqAuthClientExW ( RPC_BINDING_HANDLE  ClientBinding,
RPC_AUTHZ_HANDLE Privs,
RPC_WSTR ServerPrincName,
ULONG AuthnLevel,
ULONG AuthnSvc,
ULONG AuthzSvc,
ULONG  Flags 
)

Definition at line 1604 of file rpc_binding.c.

1607{
1609
1610 TRACE("%p %p %p %p %p %p 0x%lx\n", ClientBinding, Privs, ServerPrincName, AuthnLevel,
1611 AuthnSvc, AuthzSvc, Flags);
1612
1613 if (!ClientBinding) ClientBinding = I_RpcGetCurrentCallHandle();
1614 if (!ClientBinding) return RPC_S_INVALID_BINDING;
1615
1616 bind = ClientBinding;
1617 if (!bind->FromConn) return RPC_S_INVALID_BINDING;
1618
1619 return rpcrt4_conn_inquire_auth_client(bind->FromConn, Privs,
1620 ServerPrincName, AuthnLevel,
1621 AuthnSvc, AuthzSvc, Flags);
1622}
static RPC_STATUS rpcrt4_conn_inquire_auth_client(RpcConnection *conn, RPC_AUTHZ_HANDLE *privs, RPC_WSTR *server_princ_name, ULONG *authn_level, ULONG *authn_svc, ULONG *authz_svc, ULONG flags)
Definition: rpc_binding.h:249
RPC_BINDING_HANDLE WINAPI I_RpcGetCurrentCallHandle(void)
Definition: rpc_server.c:1743

Referenced by RpcBindingInqAuthClientExA(), and RpcBindingInqAuthClientW().

◆ RpcBindingInqAuthClientW()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingInqAuthClientW ( RPC_BINDING_HANDLE  ClientBinding,
RPC_AUTHZ_HANDLE Privs,
RPC_WSTR ServerPrincName,
ULONG AuthnLevel,
ULONG AuthnSvc,
ULONG AuthzSvc 
)

Definition at line 1566 of file rpc_binding.c.

1569{
1570 return RpcBindingInqAuthClientExW(ClientBinding, Privs, ServerPrincName, AuthnLevel,
1571 AuthnSvc, AuthzSvc, 0);
1572}

◆ RpcBindingInqAuthInfoA()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingInqAuthInfoA ( RPC_BINDING_HANDLE  Binding,
RPC_CSTR ServerPrincName,
ULONG AuthnLevel,
ULONG AuthnSvc,
RPC_AUTH_IDENTITY_HANDLE AuthIdentity,
ULONG AuthzSvc 
)

Definition at line 1532 of file rpc_binding.c.

1534{
1535 return RpcBindingInqAuthInfoExA(Binding, ServerPrincName, AuthnLevel, AuthnSvc, AuthIdentity,
1536 AuthzSvc, 0, NULL);
1537}
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingInqAuthInfoExA(RPC_BINDING_HANDLE Binding, RPC_CSTR *ServerPrincName, ULONG *AuthnLevel, ULONG *AuthnSvc, RPC_AUTH_IDENTITY_HANDLE *AuthIdentity, ULONG *AuthzSvc, ULONG RpcQosVersion, RPC_SECURITY_QOS *SecurityQOS)
Definition: rpc_binding.c:1464

Referenced by test_rpc_ncacn_ip_tcp().

◆ RpcBindingInqAuthInfoExA()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingInqAuthInfoExA ( RPC_BINDING_HANDLE  Binding,
RPC_CSTR ServerPrincName,
ULONG AuthnLevel,
ULONG AuthnSvc,
RPC_AUTH_IDENTITY_HANDLE AuthIdentity,
ULONG AuthzSvc,
ULONG  RpcQosVersion,
RPC_SECURITY_QOS SecurityQOS 
)

Definition at line 1464 of file rpc_binding.c.

1467{
1469 RPC_WSTR principal;
1470
1471 TRACE("%p %p %p %p %p %p %lu %p\n", Binding, ServerPrincName, AuthnLevel,
1472 AuthnSvc, AuthIdentity, AuthzSvc, RpcQosVersion, SecurityQOS);
1473
1474 status = RpcBindingInqAuthInfoExW(Binding, ServerPrincName ? &principal : NULL, AuthnLevel,
1475 AuthnSvc, AuthIdentity, AuthzSvc, RpcQosVersion, SecurityQOS);
1476 if (status == RPC_S_OK && ServerPrincName)
1477 {
1478 *ServerPrincName = (RPC_CSTR)RPCRT4_strdupWtoA(principal);
1479 RpcStringFreeW(&principal);
1480 if (!*ServerPrincName) return RPC_S_OUT_OF_MEMORY;
1481 }
1482
1483 return status;
1484}
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingInqAuthInfoExW(RPC_BINDING_HANDLE Binding, RPC_WSTR *ServerPrincName, ULONG *AuthnLevel, ULONG *AuthnSvc, RPC_AUTH_IDENTITY_HANDLE *AuthIdentity, ULONG *AuthzSvc, ULONG RpcQosVersion, RPC_SECURITY_QOS *SecurityQOS)
Definition: rpc_binding.c:1490

Referenced by RpcBindingInqAuthInfoA().

◆ RpcBindingInqAuthInfoExW()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingInqAuthInfoExW ( RPC_BINDING_HANDLE  Binding,
RPC_WSTR ServerPrincName,
ULONG AuthnLevel,
ULONG AuthnSvc,
RPC_AUTH_IDENTITY_HANDLE AuthIdentity,
ULONG AuthzSvc,
ULONG  RpcQosVersion,
RPC_SECURITY_QOS SecurityQOS 
)

Definition at line 1490 of file rpc_binding.c.

1493{
1495
1496 TRACE("%p %p %p %p %p %p %lu %p\n", Binding, ServerPrincName, AuthnLevel,
1497 AuthnSvc, AuthIdentity, AuthzSvc, RpcQosVersion, SecurityQOS);
1498
1499 if (!bind->AuthInfo) return RPC_S_BINDING_HAS_NO_AUTH;
1500
1501 if (SecurityQOS)
1502 {
1503 FIXME("QOS not implemented\n");
1504 return RPC_S_INVALID_BINDING;
1505 }
1506
1507 if (ServerPrincName)
1508 {
1509 if (bind->AuthInfo->server_principal_name)
1510 {
1511 *ServerPrincName = wcsdup(bind->AuthInfo->server_principal_name);
1512 if (!*ServerPrincName) return RPC_S_OUT_OF_MEMORY;
1513 }
1514 else *ServerPrincName = NULL;
1515 }
1516 if (AuthnLevel) *AuthnLevel = bind->AuthInfo->AuthnLevel;
1517 if (AuthnSvc) *AuthnSvc = bind->AuthInfo->AuthnSvc;
1518 if (AuthIdentity) *AuthIdentity = bind->AuthInfo->identity;
1519 if (AuthzSvc)
1520 {
1521 FIXME("authorization service not implemented\n");
1522 *AuthzSvc = RPC_C_AUTHZ_NONE;
1523 }
1524
1525 return RPC_S_OK;
1526}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define RPC_C_AUTHZ_NONE
Definition: rpcdce.h:167
#define RPC_S_BINDING_HAS_NO_AUTH
Definition: winerror.h:1411

Referenced by RpcBindingInqAuthInfoExA(), and RpcBindingInqAuthInfoW().

◆ RpcBindingInqAuthInfoW()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingInqAuthInfoW ( RPC_BINDING_HANDLE  Binding,
RPC_WSTR ServerPrincName,
ULONG AuthnLevel,
ULONG AuthnSvc,
RPC_AUTH_IDENTITY_HANDLE AuthIdentity,
ULONG AuthzSvc 
)

Definition at line 1543 of file rpc_binding.c.

1545{
1546 return RpcBindingInqAuthInfoExW(Binding, ServerPrincName, AuthnLevel, AuthnSvc, AuthIdentity,
1547 AuthzSvc, 0, NULL);
1548}

◆ RpcBindingInqObject()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingInqObject ( RPC_BINDING_HANDLE  Binding,
UUID ObjectUuid 
)

Definition at line 798 of file rpc_binding.c.

799{
801
802 TRACE("(%p,%p) = %s\n", Binding, ObjectUuid, debugstr_guid(&bind->ObjectUuid));
803 *ObjectUuid = bind->ObjectUuid;
804 return RPC_S_OK;
805}
#define debugstr_guid
Definition: kernel32.h:35

Referenced by ClientRpcChannelBuffer_GetBuffer(), and dispatch_rpc().

◆ RpcBindingInqOption()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingInqOption ( RPC_BINDING_HANDLE  Binding,
ULONG  Option,
ULONG_PTR OptionValue 
)

◆ RpcBindingReset()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingReset ( RPC_BINDING_HANDLE  Binding)

Definition at line 1006 of file rpc_binding.c.

1007{
1009
1010 TRACE("(%p)\n", Binding);
1011
1012 free(bind->Endpoint);
1013 bind->Endpoint = NULL;
1014 if (bind->Assoc) RpcAssoc_Release(bind->Assoc);
1015 bind->Assoc = NULL;
1016
1017 return RPC_S_OK;
1018}
#define free
Definition: debug_ros.c:5
ULONG RpcAssoc_Release(RpcAssoc *assoc)
Definition: rpc_assoc.c:187

Referenced by test_endpoint_mapper().

◆ RpcBindingServerFromClient()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingServerFromClient ( RPC_BINDING_HANDLE  ClientBinding,
RPC_BINDING_HANDLE ServerBinding 
)

Definition at line 1628 of file rpc_binding.c.

1629{
1630 RpcBinding* bind = ClientBinding;
1631 RpcBinding* NewBinding;
1632
1633 if (!bind)
1635
1636 if (!bind->server)
1637 return RPC_S_INVALID_BINDING;
1638
1639 RPCRT4_AllocBinding(&NewBinding, TRUE);
1640 NewBinding->Protseq = strdup(bind->Protseq);
1641 NewBinding->NetworkAddr = strdup(bind->NetworkAddr);
1642
1643 *ServerBinding = NewBinding;
1644
1645 return RPC_S_OK;
1646}
#define TRUE
Definition: types.h:120

Referenced by CreateJob(), and s_context_handle_test().

◆ RpcBindingSetAuthInfoA()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingSetAuthInfoA ( RPC_BINDING_HANDLE  Binding,
RPC_CSTR  ServerPrincName,
ULONG  AuthnLevel,
ULONG  AuthnSvc,
RPC_AUTH_IDENTITY_HANDLE  AuthIdentity,
ULONG  AuthzSvr 
)

Definition at line 1915 of file rpc_binding.c.

1917{
1918 TRACE("%p %s %lu %lu %p %lu\n", Binding, debugstr_a((const char*)ServerPrincName),
1919 AuthnLevel, AuthnSvc, AuthIdentity, AuthzSvr);
1920 return RpcBindingSetAuthInfoExA(Binding, ServerPrincName, AuthnLevel, AuthnSvc, AuthIdentity, AuthzSvr, NULL);
1921}
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingSetAuthInfoExA(RPC_BINDING_HANDLE Binding, RPC_CSTR ServerPrincName, ULONG AuthnLevel, ULONG AuthnSvc, RPC_AUTH_IDENTITY_HANDLE AuthIdentity, ULONG AuthzSvr, RPC_SECURITY_QOS *SecurityQos)
Definition: rpc_binding.c:1652

Referenced by test_rpc_ncacn_ip_tcp().

◆ RpcBindingSetAuthInfoExA()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingSetAuthInfoExA ( RPC_BINDING_HANDLE  Binding,
RPC_CSTR  ServerPrincName,
ULONG  AuthnLevel,
ULONG  AuthnSvc,
RPC_AUTH_IDENTITY_HANDLE  AuthIdentity,
ULONG  AuthzSvr,
RPC_SECURITY_QOS SecurityQos 
)

Definition at line 1652 of file rpc_binding.c.

1656{
1659 CredHandle cred;
1660 TimeStamp exp;
1661 ULONG package_count;
1662 ULONG i;
1663 PSecPkgInfoA packages;
1664 ULONG cbMaxToken;
1665
1666 TRACE("%p %s %lu %lu %p %lu %p\n", Binding, debugstr_a((const char*)ServerPrincName),
1667 AuthnLevel, AuthnSvc, AuthIdentity, AuthzSvr, SecurityQos);
1668
1669 if (SecurityQos)
1670 {
1672
1673 TRACE("SecurityQos { Version=%ld, Capabilities=0x%lx, IdentityTracking=%ld, ImpersonationLevel=%ld",
1674 SecurityQos->Version, SecurityQos->Capabilities, SecurityQos->IdentityTracking, SecurityQos->ImpersonationType);
1675 if (SecurityQos->Version >= 2)
1676 {
1677 const RPC_SECURITY_QOS_V2_A *SecurityQos2 = (const RPC_SECURITY_QOS_V2_A *)SecurityQos;
1678 TRACE(", AdditionalSecurityInfoType=%ld", SecurityQos2->AdditionalSecurityInfoType);
1680 TRACE(", { %p, 0x%lx, %ld, %ld, %p(%lu), %s }",
1681 SecurityQos2->u.HttpCredentials->TransportCredentials,
1682 SecurityQos2->u.HttpCredentials->Flags,
1683 SecurityQos2->u.HttpCredentials->AuthenticationTarget,
1684 SecurityQos2->u.HttpCredentials->NumberOfAuthnSchemes,
1685 SecurityQos2->u.HttpCredentials->AuthnSchemes,
1686 SecurityQos2->u.HttpCredentials->AuthnSchemes ? *SecurityQos2->u.HttpCredentials->AuthnSchemes : 0,
1688 }
1689 TRACE("}\n");
1690 status = RpcQualityOfService_Create(SecurityQos, FALSE, &bind->QOS);
1691 if (status != RPC_S_OK)
1692 return status;
1693 }
1694 else
1695 {
1696 if (bind->QOS) RpcQualityOfService_Release(bind->QOS);
1697 bind->QOS = NULL;
1698 }
1699
1700 if (AuthnSvc == RPC_C_AUTHN_DEFAULT)
1701 AuthnSvc = RPC_C_AUTHN_WINNT;
1702
1703 /* FIXME: the mapping should probably be retrieved using SSPI somehow */
1704 if (AuthnLevel == RPC_C_AUTHN_LEVEL_DEFAULT)
1705 AuthnLevel = RPC_C_AUTHN_LEVEL_NONE;
1706
1707 if ((AuthnLevel == RPC_C_AUTHN_LEVEL_NONE) || (AuthnSvc == RPC_C_AUTHN_NONE))
1708 {
1709 if (bind->AuthInfo) RpcAuthInfo_Release(bind->AuthInfo);
1710 bind->AuthInfo = NULL;
1711 return RPC_S_OK;
1712 }
1713
1714 if (AuthnLevel > RPC_C_AUTHN_LEVEL_PKT_PRIVACY)
1715 {
1716 FIXME("unknown AuthnLevel %lu\n", AuthnLevel);
1718 }
1719
1720 /* RPC_C_AUTHN_WINNT ignores the AuthzSvr parameter */
1721 if (AuthzSvr && AuthnSvc != RPC_C_AUTHN_WINNT)
1722 {
1723 FIXME("unsupported AuthzSvr %lu\n", AuthzSvr);
1725 }
1726
1727 r = EnumerateSecurityPackagesA(&package_count, &packages);
1728 if (r != SEC_E_OK)
1729 {
1730 ERR("EnumerateSecurityPackagesA failed with error 0x%08lx\n", r);
1731 return RPC_S_SEC_PKG_ERROR;
1732 }
1733
1734 for (i = 0; i < package_count; i++)
1735 if (packages[i].wRPCID == AuthnSvc)
1736 break;
1737
1738 if (i == package_count)
1739 {
1740 FIXME("unsupported AuthnSvc %lu\n", AuthnSvc);
1741 FreeContextBuffer(packages);
1743 }
1744
1745 TRACE("found package %s for service %lu\n", packages[i].Name, AuthnSvc);
1747 AuthIdentity, NULL, NULL, &cred, &exp);
1748 cbMaxToken = packages[i].cbMaxToken;
1749 FreeContextBuffer(packages);
1750 if (r == ERROR_SUCCESS)
1751 {
1752 RpcAuthInfo *new_auth_info;
1753 r = RpcAuthInfo_Create(AuthnLevel, AuthnSvc, cred, exp, cbMaxToken,
1754 AuthIdentity, &new_auth_info);
1755 if (r == RPC_S_OK)
1756 {
1757 new_auth_info->server_principal_name = RPCRT4_strdupAtoW((char *)ServerPrincName);
1758 if (!ServerPrincName || new_auth_info->server_principal_name)
1759 {
1760 if (bind->AuthInfo) RpcAuthInfo_Release(bind->AuthInfo);
1761 bind->AuthInfo = new_auth_info;
1762 }
1763 else
1764 {
1765 RpcAuthInfo_Release(new_auth_info);
1767 }
1768 }
1769 else
1770 FreeCredentialsHandle(&cred);
1771 return r;
1772 }
1773 else
1774 {
1775 ERR("AcquireCredentialsHandleA failed with error 0x%08lx\n", r);
1776 return RPC_S_SEC_PKG_ERROR;
1777 }
1778}
#define ERROR_SUCCESS
Definition: deptool.c:10
LPWSTR Name
Definition: desk.c:124
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
DWORD exp
Definition: msg.c:16058
LONG SECURITY_STATUS
Definition: sspi.h:34
#define SECPKG_CRED_OUTBOUND
Definition: sspi.h:291
RPC_STATUS RpcAuthInfo_Create(ULONG AuthnLevel, ULONG AuthnSvc, CredHandle cred, TimeStamp exp, ULONG cbMaxToken, RPC_AUTH_IDENTITY_HANDLE identity, RpcAuthInfo **ret)
Definition: rpc_binding.c:1099
ULONG RpcAuthInfo_Release(RpcAuthInfo *AuthInfo)
Definition: rpc_binding.c:1170
static RPC_STATUS RpcQualityOfService_Create(const RPC_SECURITY_QOS *qos_src, BOOL unicode, RpcQualityOfService **qos_dst)
Definition: rpc_binding.c:1232
LPWSTR RPCRT4_strdupAtoW(LPCSTR src)
Definition: rpc_binding.c:57
ULONG RpcQualityOfService_Release(RpcQualityOfService *qos)
Definition: rpc_binding.c:1347
#define RPC_C_AUTHN_DEFAULT
Definition: rpcdce.h:165
#define RPC_C_AUTHN_LEVEL_PKT_PRIVACY
Definition: rpcdce.h:151
#define RPC_C_AUTHN_LEVEL_NONE
Definition: rpcdce.h:146
#define RPC_C_AUTHN_LEVEL_DEFAULT
Definition: rpcdce.h:145
#define RPC_C_AUTHN_INFO_TYPE_HTTP
Definition: rpcdce.h:195
#define RPC_C_AUTHN_WINNT
Definition: rpcdce.h:158
#define RPC_C_AUTHN_NONE
Definition: rpcdce.h:153
SECURITY_STATUS WINAPI FreeContextBuffer(PVOID pv)
Definition: sspi.c:699
SECURITY_STATUS WINAPI EnumerateSecurityPackagesA(PULONG pcPackages, PSecPkgInfoA *ppPackageInfo)
Definition: sspi.c:855
SEC_WINNT_AUTH_IDENTITY_A * TransportCredentials
Definition: rpcdce.h:255
unsigned char * ServerCertificateSubject
Definition: rpcdce.h:260
ULONG AdditionalSecurityInfoType
Definition: rpcdce.h:289
union _RPC_SECURITY_QOS_V2_A::@3415 u
RPC_HTTP_TRANSPORT_CREDENTIALS_A * HttpCredentials
Definition: rpcdce.h:292
ULONG ImpersonationType
Definition: rpcdce.h:267
ULONG Capabilities
Definition: rpcdce.h:265
ULONG IdentityTracking
Definition: rpcdce.h:266
LPWSTR server_principal_name
Definition: rpc_binding.h:50
ULONG cbMaxToken
Definition: sspi.h:107
uint32_t ULONG
Definition: typedefs.h:59
#define SEC_E_OK
Definition: winerror.h:3450
#define RPC_S_UNKNOWN_AUTHN_LEVEL
Definition: winerror.h:1413
#define RPC_S_UNKNOWN_AUTHN_SERVICE
Definition: winerror.h:1412
#define RPC_S_SEC_PKG_ERROR
Definition: winerror.h:1489
#define RPC_S_UNKNOWN_AUTHZ_SERVICE
Definition: winerror.h:1415
SECURITY_STATUS WINAPI AcquireCredentialsHandleA(SEC_CHAR *pszPrincipal, SEC_CHAR *pszPackage, ULONG fCredentialsUse, PLUID pvLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn, PVOID pvGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry)
Definition: wrapper.c:59
SECURITY_STATUS WINAPI FreeCredentialsHandle(PCredHandle phCredential)
Definition: wrapper.c:151

Referenced by RpcBindingSetAuthInfoA().

◆ RpcBindingSetAuthInfoExW()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingSetAuthInfoExW ( RPC_BINDING_HANDLE  Binding,
RPC_WSTR  ServerPrincName,
ULONG  AuthnLevel,
ULONG  AuthnSvc,
RPC_AUTH_IDENTITY_HANDLE  AuthIdentity,
ULONG  AuthzSvr,
RPC_SECURITY_QOS SecurityQos 
)

Definition at line 1784 of file rpc_binding.c.

1787{
1790 CredHandle cred;
1791 TimeStamp exp;
1792 ULONG package_count;
1793 ULONG i;
1794 PSecPkgInfoW packages;
1795 ULONG cbMaxToken;
1796
1797 TRACE("%p %s %lu %lu %p %lu %p\n", Binding, debugstr_w(ServerPrincName),
1798 AuthnLevel, AuthnSvc, AuthIdentity, AuthzSvr, SecurityQos);
1799
1800 if (SecurityQos)
1801 {
1803
1804 TRACE("SecurityQos { Version=%ld, Capabilities=0x%lx, IdentityTracking=%ld, ImpersonationLevel=%ld",
1805 SecurityQos->Version, SecurityQos->Capabilities, SecurityQos->IdentityTracking, SecurityQos->ImpersonationType);
1806 if (SecurityQos->Version >= 2)
1807 {
1808 const RPC_SECURITY_QOS_V2_W *SecurityQos2 = (const RPC_SECURITY_QOS_V2_W *)SecurityQos;
1809 TRACE(", AdditionalSecurityInfoType=%ld", SecurityQos2->AdditionalSecurityInfoType);
1811 TRACE(", { %p, 0x%lx, %ld, %ld, %p(%lu), %s }",
1812 SecurityQos2->u.HttpCredentials->TransportCredentials,
1813 SecurityQos2->u.HttpCredentials->Flags,
1814 SecurityQos2->u.HttpCredentials->AuthenticationTarget,
1815 SecurityQos2->u.HttpCredentials->NumberOfAuthnSchemes,
1816 SecurityQos2->u.HttpCredentials->AuthnSchemes,
1817 SecurityQos2->u.HttpCredentials->AuthnSchemes ? *SecurityQos2->u.HttpCredentials->AuthnSchemes : 0,
1819 }
1820 TRACE("}\n");
1821 status = RpcQualityOfService_Create(SecurityQos, TRUE, &bind->QOS);
1822 if (status != RPC_S_OK)
1823 return status;
1824 }
1825 else
1826 {
1827 if (bind->QOS) RpcQualityOfService_Release(bind->QOS);
1828 bind->QOS = NULL;
1829 }
1830
1831 if (AuthnSvc == RPC_C_AUTHN_DEFAULT)
1832 AuthnSvc = RPC_C_AUTHN_WINNT;
1833
1834 /* FIXME: the mapping should probably be retrieved using SSPI somehow */
1835 if (AuthnLevel == RPC_C_AUTHN_LEVEL_DEFAULT)
1836 AuthnLevel = RPC_C_AUTHN_LEVEL_NONE;
1837
1838 if ((AuthnLevel == RPC_C_AUTHN_LEVEL_NONE) || (AuthnSvc == RPC_C_AUTHN_NONE))
1839 {
1840 if (bind->AuthInfo) RpcAuthInfo_Release(bind->AuthInfo);
1841 bind->AuthInfo = NULL;
1842 return RPC_S_OK;
1843 }
1844
1845 if (AuthnLevel > RPC_C_AUTHN_LEVEL_PKT_PRIVACY)
1846 {
1847 FIXME("unknown AuthnLevel %lu\n", AuthnLevel);
1849 }
1850
1851 /* RPC_C_AUTHN_WINNT ignores the AuthzSvr parameter */
1852 if (AuthzSvr && AuthnSvc != RPC_C_AUTHN_WINNT)
1853 {
1854 FIXME("unsupported AuthzSvr %lu\n", AuthzSvr);
1856 }
1857
1858 r = EnumerateSecurityPackagesW(&package_count, &packages);
1859 if (r != SEC_E_OK)
1860 {
1861 ERR("EnumerateSecurityPackagesW failed with error 0x%08lx\n", r);
1862 return RPC_S_SEC_PKG_ERROR;
1863 }
1864
1865 for (i = 0; i < package_count; i++)
1866 if (packages[i].wRPCID == AuthnSvc)
1867 break;
1868
1869 if (i == package_count)
1870 {
1871 FIXME("unsupported AuthnSvc %lu\n", AuthnSvc);
1872 FreeContextBuffer(packages);
1874 }
1875
1876 TRACE("found package %s for service %lu\n", debugstr_w(packages[i].Name), AuthnSvc);
1878 AuthIdentity, NULL, NULL, &cred, &exp);
1879 cbMaxToken = packages[i].cbMaxToken;
1880 FreeContextBuffer(packages);
1881 if (r == ERROR_SUCCESS)
1882 {
1883 RpcAuthInfo *new_auth_info;
1884 r = RpcAuthInfo_Create(AuthnLevel, AuthnSvc, cred, exp, cbMaxToken,
1885 AuthIdentity, &new_auth_info);
1886 if (r == RPC_S_OK)
1887 {
1888 new_auth_info->server_principal_name = wcsdup(ServerPrincName);
1889 if (!ServerPrincName || new_auth_info->server_principal_name)
1890 {
1891 if (bind->AuthInfo) RpcAuthInfo_Release(bind->AuthInfo);
1892 bind->AuthInfo = new_auth_info;
1893 }
1894 else
1895 {
1896 RpcAuthInfo_Release(new_auth_info);
1898 }
1899 }
1900 else
1901 FreeCredentialsHandle(&cred);
1902 return r;
1903 }
1904 else
1905 {
1906 ERR("AcquireCredentialsHandleW failed with error 0x%08lx\n", r);
1907 return RPC_S_SEC_PKG_ERROR;
1908 }
1909}
SECURITY_STATUS WINAPI EnumerateSecurityPackagesW(PULONG pcPackages, PSecPkgInfoW *ppPackageInfo)
Definition: sspi.c:709
SEC_WINNT_AUTH_IDENTITY_W * TransportCredentials
Definition: rpcdce.h:245
unsigned short * ServerCertificateSubject
Definition: rpcdce.h:250
union _RPC_SECURITY_QOS_V2_W::@3414 u
RPC_HTTP_TRANSPORT_CREDENTIALS_W * HttpCredentials
Definition: rpcdce.h:279
ULONG AdditionalSecurityInfoType
Definition: rpcdce.h:276
ULONG cbMaxToken
Definition: sspi.h:117
SECURITY_STATUS WINAPI AcquireCredentialsHandleW(SEC_WCHAR *pszPrincipal, SEC_WCHAR *pszPackage, ULONG fCredentialsUse, PLUID pvLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn, PVOID pvGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry)
Definition: wrapper.c:105

Referenced by RpcBindingSetAuthInfoW().

◆ RpcBindingSetAuthInfoW()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingSetAuthInfoW ( RPC_BINDING_HANDLE  Binding,
RPC_WSTR  ServerPrincName,
ULONG  AuthnLevel,
ULONG  AuthnSvc,
RPC_AUTH_IDENTITY_HANDLE  AuthIdentity,
ULONG  AuthzSvr 
)

Definition at line 1927 of file rpc_binding.c.

1929{
1930 TRACE("%p %s %lu %lu %p %lu\n", Binding, debugstr_w(ServerPrincName),
1931 AuthnLevel, AuthnSvc, AuthIdentity, AuthzSvr);
1932 return RpcBindingSetAuthInfoExW(Binding, ServerPrincName, AuthnLevel, AuthnSvc, AuthIdentity, AuthzSvr, NULL);
1933}
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingSetAuthInfoExW(RPC_BINDING_HANDLE Binding, RPC_WSTR ServerPrincName, ULONG AuthnLevel, ULONG AuthnSvc, RPC_AUTH_IDENTITY_HANDLE AuthIdentity, ULONG AuthzSvr, RPC_SECURITY_QOS *SecurityQos)
Definition: rpc_binding.c:1784

◆ RpcBindingSetObject()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingSetObject ( RPC_BINDING_HANDLE  Binding,
UUID ObjectUuid 
)

Definition at line 810 of file rpc_binding.c.

811{
813
814 TRACE("(%p,%s)\n", Binding, debugstr_guid(ObjectUuid));
815 if (bind->server) return RPC_S_WRONG_KIND_OF_BINDING;
816 return RPCRT4_SetBindingObject(Binding, ObjectUuid);
817}
#define RPC_S_WRONG_KIND_OF_BINDING
Definition: winerror.h:1368

Referenced by RPC_CreateClientChannel().

◆ RpcBindingSetOption()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingSetOption ( RPC_BINDING_HANDLE  Binding,
ULONG  Option,
ULONG_PTR  OptionValue 
)

Definition at line 1938 of file rpc_binding.c.

1939{
1940 TRACE("(%p, %ld, %Id)\n", BindingHandle, Option, OptionValue);
1941
1942 switch (Option)
1943 {
1945 {
1948 int len = MultiByteToWideChar(CP_ACP, 0, cookie->Buffer, cookie->BufferSize, NULL, 0);
1949 WCHAR *str;
1950
1951 if (!(str = malloc((len + 1) * sizeof(WCHAR)))) return RPC_S_OUT_OF_MEMORY;
1952 MultiByteToWideChar(CP_ACP, 0, cookie->Buffer, cookie->BufferSize, str, len);
1953 str[len] = 0;
1954 free(binding->CookieAuth);
1955 binding->CookieAuth = str;
1956 break;
1957 }
1958 default:
1959 FIXME("option %lu not supported\n", Option);
1960 break;
1961 }
1962 return RPC_S_OK;
1963}
#define malloc
Definition: debug_ros.c:4
#define MultiByteToWideChar
Definition: compat.h:110
GLenum GLsizei len
Definition: glext.h:6722
static RPC_BINDING_HANDLE binding
Definition: server.c:166
const WCHAR * str
#define RPC_C_OPT_COOKIE_AUTH
Definition: rpcdcep.h:127
Definition: cookie.c:34
_In_ ULONG _Out_ HANDLE * BindingHandle
Definition: tdikrnl.h:1147

◆ RpcBindingToStringBindingA()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingToStringBindingA ( RPC_BINDING_HANDLE  Binding,
RPC_CSTR StringBinding 
)

Definition at line 902 of file rpc_binding.c.

903{
906 RPC_CSTR ObjectUuid;
907
908 TRACE("(%p,%p)\n", Binding, StringBinding);
909
910 if (UuidIsNil(&bind->ObjectUuid, &ret))
911 ObjectUuid = NULL;
912 else
913 {
914 ret = UuidToStringA(&bind->ObjectUuid, &ObjectUuid);
915 if (ret != RPC_S_OK) return ret;
916 }
917
918 ret = RpcStringBindingComposeA(ObjectUuid, (unsigned char*)bind->Protseq, (unsigned char*) bind->NetworkAddr,
919 (unsigned char*) bind->Endpoint, NULL, StringBinding);
920
921 RpcStringFreeA(&ObjectUuid);
922
923 return ret;
924}
RPC_STATUS WINAPI RpcStringBindingComposeA(RPC_CSTR ObjUuid, RPC_CSTR Protseq, RPC_CSTR NetworkAddr, RPC_CSTR Endpoint, RPC_CSTR Options, RPC_CSTR *StringBinding)
Definition: rpc_binding.c:440
RPC_STATUS WINAPI UuidToStringA(UUID *Uuid, RPC_CSTR *StringUuid)
Definition: rpcrt4_main.c:539
int WINAPI UuidIsNil(UUID *Uuid, RPC_STATUS *Status)
Definition: rpcrt4_main.c:293

Referenced by RpcBindingToStringBindingW(), s_context_handle_test(), test_RpcServerUseProtseq(), and test_RpcStringBindingFromBinding().

◆ RpcBindingToStringBindingW()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingToStringBindingW ( RPC_BINDING_HANDLE  Binding,
RPC_WSTR StringBinding 
)

Definition at line 929 of file rpc_binding.c.

930{
932 unsigned char *str = NULL;
933 TRACE("(%p,%p)\n", Binding, StringBinding);
935 *StringBinding = RPCRT4_strdupAtoW((char*)str);
937 return ret;
938}
RPC_STATUS WINAPI RpcBindingToStringBindingA(RPC_BINDING_HANDLE Binding, RPC_CSTR *StringBinding)
Definition: rpc_binding.c:902

Referenced by CreateJob().

◆ RpcBindingVectorFree()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingVectorFree ( RPC_BINDING_VECTOR **  BindingVector)

Definition at line 784 of file rpc_binding.c.

785{
786 ULONG c;
787
788 TRACE("(%p)\n", BindingVector);
789 for (c=0; c<(*BindingVector)->Count; c++) RpcBindingFree(&(*BindingVector)->BindingH[c]);
790 free(*BindingVector);
791 *BindingVector = NULL;
792 return RPC_S_OK;
793}
const GLubyte * c
Definition: glext.h:8905
#define c
Definition: ke_i.h:80
RPC_STATUS WINAPI RpcBindingFree(RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:769

Referenced by test_endpoint_mapper(), and test_RpcServerUseProtseq().

◆ RpcCancelThread()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcCancelThread ( void ThreadHandle)

Definition at line 1085 of file rpcrt4_main.c.

1086{
1087 TRACE("(%p)\n", ThreadHandle);
1088 return RpcCancelThreadEx(ThreadHandle, 0);
1089}
RPC_STATUS RPC_ENTRY RpcCancelThreadEx(void *ThreadHandle, LONG Timeout)
Definition: rpcrt4_main.c:1094

◆ RpcCancelThreadEx()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcCancelThreadEx ( void ThreadHandle,
LONG  Timeout 
)

Definition at line 1094 of file rpcrt4_main.c.

1095{
1096 DWORD target_tid;
1097
1098 FIXME("(%p, %ld)\n", ThreadHandle, Timeout);
1099
1100 target_tid = GetThreadId(ThreadHandle);
1101 if (!target_tid)
1102 return RPC_S_INVALID_ARG;
1103
1104 if (Timeout)
1105 {
1106 FIXME("(%p, %ld)\n", ThreadHandle, Timeout);
1107 return RPC_S_OK;
1108 }
1109 else
1110 return rpc_cancel_thread(target_tid);
1111}
DWORD WINAPI GetThreadId(IN HANDLE Thread)
Definition: thread.c:913
static ULONG Timeout
Definition: ping.c:61
static RPC_STATUS rpc_cancel_thread(DWORD target_tid)
Definition: rpcrt4_main.c:1064

Referenced by RpcCancelThread().

◆ RpcEpRegisterA()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcEpRegisterA ( RPC_IF_HANDLE  IfSpec,
RPC_BINDING_VECTOR BindingVector,
UUID_VECTOR UuidVector,
RPC_CSTR  Annotation 
)

Definition at line 295 of file rpc_epmap.c.

297{
298 return epm_register(IfSpec, BindingVector, UuidVector, Annotation, TRUE);
299}
static RPC_STATUS epm_register(RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR *BindingVector, UUID_VECTOR *UuidVector, RPC_CSTR Annotation, BOOL replace)
Definition: rpc_epmap.c:195

Referenced by test_endpoint_mapper().

◆ RpcEpRegisterNoReplaceA()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcEpRegisterNoReplaceA ( RPC_IF_HANDLE  IfSpec,
RPC_BINDING_VECTOR BindingVector,
UUID_VECTOR UuidVector,
RPC_CSTR  Annotation 
)

Definition at line 304 of file rpc_epmap.c.

306{
307 return epm_register(IfSpec, BindingVector, UuidVector, Annotation, FALSE);
308}

◆ RpcEpRegisterNoReplaceW()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcEpRegisterNoReplaceW ( RPC_IF_HANDLE  IfSpec,
RPC_BINDING_VECTOR BindingVector,
UUID_VECTOR UuidVector,
RPC_WSTR  Annotation 
)

Definition at line 328 of file rpc_epmap.c.

330{
331 LPSTR annA = RPCRT4_strdupWtoA(Annotation);
333
334 status = epm_register(IfSpec, BindingVector, UuidVector, (RPC_CSTR)annA, FALSE);
335
336 free(annA);
337 return status;
338}

◆ RpcEpRegisterW()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcEpRegisterW ( RPC_IF_HANDLE  IfSpec,
RPC_BINDING_VECTOR BindingVector,
UUID_VECTOR UuidVector,
RPC_WSTR  Annotation 
)

Definition at line 313 of file rpc_epmap.c.

315{
316 LPSTR annA = RPCRT4_strdupWtoA(Annotation);
318
319 status = epm_register(IfSpec, BindingVector, UuidVector, (RPC_CSTR)annA, TRUE);
320
321 free(annA);
322 return status;
323}

◆ RpcEpResolveBinding()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcEpResolveBinding ( RPC_BINDING_HANDLE  Binding,
RPC_IF_HANDLE  IfSpec 
)

Definition at line 430 of file rpc_epmap.c.

431{
432 PRPC_CLIENT_INTERFACE If = IfSpec;
435 error_status_t status2;
437 ept_lookup_handle_t entry_handle = NULL;
438 twr_t *tower;
439 twr_t *towers[4] = { NULL };
440 unsigned32 num_towers, i;
442 char *resolved_endpoint = NULL;
443
444 TRACE("(%p,%p)\n", Binding, IfSpec);
445 TRACE(" protseq=%s\n", debugstr_a(bind->Protseq));
446 TRACE(" obj=%s\n", debugstr_guid(&bind->ObjectUuid));
447 TRACE(" networkaddr=%s\n", debugstr_a(bind->NetworkAddr));
448 TRACE(" ifid=%s\n", debugstr_guid(&If->InterfaceId.SyntaxGUID));
449
450 /* just return for fully bound handles */
451 if (bind->Endpoint && (bind->Endpoint[0] != '\0'))
452 return RPC_S_OK;
453
455 if (status != RPC_S_OK) return status;
456
457 status = TowerConstruct(&If->InterfaceId, &If->TransferSyntax, bind->Protseq,
458 ((RpcBinding *)handle)->Endpoint,
459 bind->NetworkAddr, &tower);
460 if (status != RPC_S_OK)
461 {
462 WARN("couldn't get tower\n");
464 return status;
465 }
466
467 while (TRUE)
468 {
469 __TRY
470 {
471 ept_map(handle, &uuid, tower, &entry_handle, ARRAY_SIZE(towers), &num_towers, towers, &status2);
472 /* FIXME: translate status2? */
473 }
475 {
476 status2 = GetExceptionCode();
477 }
479 if (status2 == RPC_S_SERVER_UNAVAILABLE &&
481 {
482 if (start_rpcss())
483 continue;
484 }
485 break;
486 };
487
489 I_RpcFree(tower);
490
491 if (status2 != RPC_S_OK)
492 {
493 ERR("ept_map failed for ifid %s, protseq %s, networkaddr %s\n", debugstr_guid(&If->TransferSyntax.SyntaxGUID), bind->Protseq, bind->NetworkAddr);
494 return status2;
495 }
496
497 for (i = 0; i < num_towers; i++)
498 {
499 /* only parse the tower if we haven't already found a suitable
500 * endpoint, otherwise just free the tower */
501 if (!resolved_endpoint)
502 {
503 status = TowerExplode(towers[i], NULL, NULL, NULL, &resolved_endpoint, NULL);
504 TRACE("status = %ld\n", status);
505 }
506 I_RpcFree(towers[i]);
507 }
508
509 if (resolved_endpoint)
510 {
511 RPCRT4_ResolveBinding(Binding, resolved_endpoint);
512 I_RpcFree(resolved_endpoint);
513 return RPC_S_OK;
514 }
515
516 WARN("couldn't find an endpoint\n");
518}
#define ARRAY_SIZE(A)
Definition: main.h:20
#define WARN(fmt,...)
Definition: precomp.h:61
unsigned long error_status_t
Definition: basetyps.h:83
#define __TRY
Definition: compat.h:80
#define __ENDTRY
Definition: compat.h:82
void __cdecl ept_map(handle_t h, uuid_p_t object, twr_p_t map_tower, ept_lookup_handle_t *entry_handle, unsigned32 max_towers, unsigned32 *num_towers, twr_p_t *towers, error_status_t *status)
Definition: epmp.c:201
#define GetExceptionCode
Definition: excpt.h:83
Definition: msctf.idl:532
#define GUID_NULL
Definition: ks.h:106
unsigned int unsigned32
Definition: rpc.c:47
RPC_STATUS RPCRT4_ResolveBinding(RpcBinding *Binding, LPCSTR Endpoint)
Definition: rpc_binding.c:187
RPC_STATUS WINAPI TowerExplode(const twr_t *tower, PRPC_SYNTAX_IDENTIFIER object, PRPC_SYNTAX_IDENTIFIER syntax, char **protseq, char **endpoint, char **address)
Definition: rpc_epmap.c:523
static RPC_STATUS get_epm_handle_client(RPC_BINDING_HANDLE handle, RPC_BINDING_HANDLE *epm_handle)
Definition: rpc_epmap.c:139
RPC_STATUS WINAPI TowerConstruct(const RPC_SYNTAX_IDENTIFIER *object, const RPC_SYNTAX_IDENTIFIER *syntax, const char *protseq, const char *endpoint, const char *address, twr_t **tower)
Definition: rpc_epmap.c:595
static BOOL is_epm_destination_local(RPC_BINDING_HANDLE handle)
Definition: rpc_epmap.c:128
static LONG WINAPI rpc_filter(EXCEPTION_POINTERS *__eptr)
Definition: rpc_epmap.c:183
static BOOL start_rpcss(void)
Definition: rpc_epmap.c:79
void WINAPI I_RpcFree(void *Object)
Definition: rpcrt4_main.c:755
RPC_SYNTAX_IDENTIFIER InterfaceId
Definition: rpcdcep.h:117
RPC_SYNTAX_IDENTIFIER TransferSyntax
Definition: rpcdcep.h:118
Definition: rpc.c:49
#define __EXCEPT(func)
Definition: exception.h:62
#define EPT_S_NOT_REGISTERED
Definition: winerror.h:1418
#define RPC_S_SERVER_UNAVAILABLE
Definition: winerror.h:1389

Referenced by I_RpcNegotiateTransferSyntax(), and test_endpoint_mapper().

◆ RpcEpUnregister()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcEpUnregister ( RPC_IF_HANDLE  IfSpec,
RPC_BINDING_VECTOR BindingVector,
UUID_VECTOR UuidVector 
)

Definition at line 343 of file rpc_epmap.c.

345{
346 PRPC_SERVER_INTERFACE If = IfSpec;
347 ULONG i;
349 error_status_t status2;
350 ept_entry_t *entries;
352
353 TRACE("(%p,%p,%p)\n", IfSpec, BindingVector, UuidVector);
354 TRACE(" ifid=%s\n", debugstr_guid(&If->InterfaceId.SyntaxGUID));
355 for (i=0; i<BindingVector->Count; i++) {
356 RpcBinding* bind = BindingVector->BindingH[i];
357 TRACE(" protseq[%ld]=%s\n", i, debugstr_a(bind->Protseq));
358 TRACE(" endpoint[%ld]=%s\n", i, debugstr_a(bind->Endpoint));
359 }
360 if (UuidVector) {
361 for (i=0; i<UuidVector->Count; i++)
362 TRACE(" obj[%ld]=%s\n", i, debugstr_guid(UuidVector->Uuid[i]));
363 }
364
365 entries = calloc(BindingVector->Count * (UuidVector ? UuidVector->Count : 1), sizeof(*entries));
366 if (!entries)
367 return RPC_S_OUT_OF_MEMORY;
368
370 if (status != RPC_S_OK)
371 {
372 free(entries);
373 return status;
374 }
375
376 for (i = 0; i < BindingVector->Count; i++)
377 {
378 unsigned j;
379 RpcBinding* bind = BindingVector->BindingH[i];
380 for (j = 0; j < (UuidVector ? UuidVector->Count : 1); j++)
381 {
383 bind->Protseq, bind->Endpoint,
384 bind->NetworkAddr,
385 &entries[i*(UuidVector ? UuidVector->Count : 1) + j].tower);
386 if (status != RPC_S_OK) break;
387
388 if (UuidVector)
389 memcpy(&entries[i * UuidVector->Count + j].object, &UuidVector->Uuid[j], sizeof(GUID));
390 else
391 memset(&entries[i].object, 0, sizeof(entries[i].object));
392 }
393 }
394
395 if (status == RPC_S_OK)
396 {
397 __TRY
398 {
399 ept_insert(handle, BindingVector->Count * (UuidVector ? UuidVector->Count : 1),
400 entries, TRUE, &status2);
401 }
403 {
404 status2 = GetExceptionCode();
405 }
407 if (status2 == RPC_S_SERVER_UNAVAILABLE)
408 status2 = EPT_S_NOT_REGISTERED;
409 if (status2 != RPC_S_OK)
410 ERR("ept_insert failed with error %ld\n", status2);
411 status = status2; /* FIXME: convert status? */
412 }
414
415 for (i = 0; i < BindingVector->Count; i++)
416 {
417 unsigned j;
418 for (j = 0; j < (UuidVector ? UuidVector->Count : 1); j++)
419 I_RpcFree(entries[i*(UuidVector ? UuidVector->Count : 1) + j].tower);
420 }
421
422 free(entries);
423
424 return status;
425}
void __cdecl ept_insert(handle_t h, unsigned32 num_ents, ept_entry_t entries[], boolean32 replace, error_status_t *status)
Definition: epmp.c:92
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define calloc
Definition: rosglue.h:14
static RPC_STATUS get_epm_handle_server(RPC_BINDING_HANDLE *epm_handle)
Definition: rpc_epmap.c:176
#define memset(x, y, z)
Definition: compat.h:39
RPC_BINDING_HANDLE BindingH[1]
Definition: rpcdce.h:58
RPC_SYNTAX_IDENTIFIER InterfaceId
Definition: rpcdcep.h:104
RPC_SYNTAX_IDENTIFIER TransferSyntax
Definition: rpcdcep.h:105
UUID * Uuid[1]
Definition: rpcdce.h:65
ULONG Count
Definition: rpcdce.h:64

Referenced by test_endpoint_mapper().

◆ RpcExceptionFilter()

RPCRTAPI int RPC_ENTRY RpcExceptionFilter ( ULONG  ExceptionCode)

Definition at line 890 of file rpcrt4_main.c.

891{
892 TRACE("0x%lx\n", ExceptionCode);
893 switch (ExceptionCode)
894 {
904 default:
906 }
907}
_Inout_ PIRP _In_ NTSTATUS ExceptionCode
Definition: cdprocs.h:1774
#define STATUS_ILLEGAL_INSTRUCTION
Definition: d3dkmdt.h:41
#define STATUS_ACCESS_VIOLATION
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:90
#define EXCEPTION_CONTINUE_SEARCH
Definition: excpt.h:91
#define STATUS_POSSIBLE_DEADLOCK
Definition: ntstatus.h:731
#define STATUS_INSTRUCTION_MISALIGNMENT
Definition: ntstatus.h:500
#define STATUS_STACK_OVERFLOW
Definition: ntstatus.h:583
#define STATUS_PRIVILEGED_INSTRUCTION
Definition: ntstatus.h:480
#define STATUS_BREAKPOINT
Definition: ntstatus.h:264
#define STATUS_DATATYPE_MISALIGNMENT
Definition: ntstatus.h:263

Referenced by test_RpcExceptionFilter().

◆ RpcImpersonateClient()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcImpersonateClient ( RPC_BINDING_HANDLE  Binding)

Definition at line 1038 of file rpc_binding.c.

1039{
1041
1042 TRACE("(%p)\n", BindingHandle);
1043
1046
1048 if (bind->FromConn)
1049 return rpcrt4_conn_impersonate_client(bind->FromConn);
1051}
static RPC_STATUS rpcrt4_conn_impersonate_client(RpcConnection *conn)
Definition: rpc_binding.h:237

Referenced by _RpcAbortPrinter(), _RpcAddForm(), _RpcAddJob(), _RpcAddMonitor(), _RpcAddPort(), _RpcAddPortEx(), _RpcAddPrinterDriver(), _RpcAddPrinterDriverEx(), _RpcAddPrintProcessor(), _RpcAddPrintProvidor(), _RpcClosePrinter(), _RpcCloseSpoolFileHandle(), _RpcCommitSpoolData(), _RpcCommitSpoolData2(), _RpcConfigurePort(), _RpcDeleteForm(), _RpcDeleteMonitor(), _RpcDeletePort(), _RpcDeletePrinter(), _RpcDeletePrinterDriver(), _RpcDeletePrinterDriverEx(), _RpcDeletePrintProcessor(), _RpcDeletePrintProvidor(), _RpcEndDocPrinter(), _RpcEndPagePrinter(), _RpcEnumForms(), _RpcEnumJobs(), _RpcEnumMonitors(), _RpcEnumPorts(), _RpcEnumPrinterDrivers(), _RpcEnumPrinters(), _RpcEnumPrintProcessorDatatypes(), _RpcEnumPrintProcessors(), _RpcGetForm(), _RpcGetJob(), _RpcGetPrinter(), _RpcGetPrinterDataEx(), _RpcGetPrinterDriver(), _RpcGetPrinterDriver2(), _RpcGetPrinterDriverDirectory(), _RpcGetPrintProcessorDirectory(), _RpcGetSpoolFileInfo(), _RpcGetSpoolFileInfo2(), _RpcOpenPrinter(), _RpcPrinterMessageBox(), _RpcReadPrinter(), _RpcResetPrinterEx(), _RpcScheduleJob(), _RpcSeekPrinter(), _RpcSetForm(), _RpcSetJob(), _RpcSetPort(), _RpcSetPrinterDataEx(), _RpcSpoolerInit(), _RpcStartDocPrinter(), _RpcStartPagePrinter(), _RpcWritePrinter(), _RpcXcvData(), IsCallerInteractive(), LsarSetSecurityObject(), NetpGetClientLogonId(), RSetServiceObjectSecurity(), s_authinfo_test(), and YGetPrinterDriver2().

◆ RpcMgmtEnableIdleCleanup()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcMgmtEnableIdleCleanup ( void  )

Definition at line 1611 of file rpc_server.c.

1612{
1613 FIXME("(): stub\n");
1614 return RPC_S_OK;
1615}

◆ RpcMgmtEpEltInqBegin()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcMgmtEpEltInqBegin ( RPC_BINDING_HANDLE  EpBinding,
ULONG  InquiryType,
RPC_IF_ID IfId,
ULONG  VersOption,
UUID ObjectUuid,
RPC_EP_INQ_HANDLE InquiryContext 
)

Definition at line 1693 of file rpc_server.c.

1695{
1696 FIXME("(%p,%lu,%p,%lu,%p,%p): stub\n",
1697 Binding, InquiryType, IfId, VersOption, ObjectUuid, InquiryContext);
1698 return RPC_S_INVALID_BINDING;
1699}

◆ RpcMgmtInqIfIds()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcMgmtInqIfIds ( RPC_BINDING_HANDLE  Binding,
RPC_IF_ID_VECTOR **  IfIdVector 
)

Definition at line 1650 of file rpc_server.c.

1651{
1652 FIXME("(%p,%p): stub\n", Binding, IfIdVector);
1653 return RPC_S_INVALID_BINDING;
1654}

◆ RpcMgmtInqStats()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcMgmtInqStats ( RPC_BINDING_HANDLE  Binding,
RPC_STATS_VECTOR **  Statistics 
)

Definition at line 1659 of file rpc_server.c.

1660{
1661 RPC_STATS_VECTOR *stats;
1662
1663 FIXME("(%p,%p)\n", Binding, Statistics);
1664
1665 if ((stats = malloc(sizeof(RPC_STATS_VECTOR))))
1666 {
1667 stats->Count = 1;
1668 stats->Stats[0] = 0;
1669 *Statistics = stats;
1670 return RPC_S_OK;
1671 }
1673}
unsigned int Count
Definition: rpcdce.h:84
ULONG Stats[1]
Definition: rpcdce.h:85
#define RPC_S_OUT_OF_RESOURCES
Definition: winerror.h:1388

◆ RpcMgmtIsServerListening()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcMgmtIsServerListening ( RPC_BINDING_HANDLE  Binding)

Definition at line 1704 of file rpc_server.c.

1705{
1707
1708 TRACE("(%p)\n", Binding);
1709
1710 if (Binding) {
1711 RpcBinding *rpc_binding = (RpcBinding*)Binding;
1712 status = RPCRT4_IsServerListening(rpc_binding->Protseq, rpc_binding->Endpoint);
1713 }else {
1717 }
1718
1719 return status;
1720}
RPC_STATUS RPCRT4_IsServerListening(const char *protseq, const char *endpoint)
static BOOL std_listen
Definition: rpc_server.c:101
static HANDLE listen_done_event
Definition: rpc_server.c:105
static CRITICAL_SECTION listen_cs
Definition: rpc_server.c:82
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define RPC_S_NOT_LISTENING
Definition: winerror.h:1382

Referenced by _test_is_server_listening(), and _test_is_server_listening2().

◆ RpcMgmtSetAuthorizationFn()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcMgmtSetAuthorizationFn ( RPC_MGMT_AUTHORIZATION_FN  fn)

Definition at line 1725 of file rpc_server.c.

1726{
1727 FIXME("(%p): stub\n", fn);
1728 return RPC_S_OK;
1729}
static GLenum _GLUfuncptr fn
Definition: wgl_font.c:159

◆ RpcMgmtSetCancelTimeout()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcMgmtSetCancelTimeout ( LONG  Timeout)

Definition at line 957 of file rpcrt4_main.c.

958{
959 FIXME("(%ld): stub\n", Timeout);
960 return RPC_S_OK;
961}

◆ RpcMgmtSetComTimeout()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcMgmtSetComTimeout ( RPC_BINDING_HANDLE  Binding,
unsigned int  Timeout 
)

Definition at line 1454 of file rpc_binding.c.

1455{
1456 FIXME("(%p, %d): stub\n", BindingHandle, Timeout);
1457 return RPC_S_OK;
1458}

◆ RpcMgmtSetServerStackSize()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcMgmtSetServerStackSize ( ULONG  ThreadStackSize)

Definition at line 1734 of file rpc_server.c.

1735{
1736 FIXME("(0x%lx): stub\n", ThreadStackSize);
1737 return RPC_S_OK;
1738}

Referenced by CallPerInstanceInitFunctions().

◆ RpcMgmtStatsVectorFree()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcMgmtStatsVectorFree ( RPC_STATS_VECTOR **  StatsVector)

Definition at line 1678 of file rpc_server.c.

1679{
1680 FIXME("(%p)\n", StatsVector);
1681
1682 if (StatsVector)
1683 {
1684 free(*StatsVector);
1685 *StatsVector = NULL;
1686 }
1687 return RPC_S_OK;
1688}

◆ RpcMgmtStopServerListening()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcMgmtStopServerListening ( RPC_BINDING_HANDLE  Binding)

Definition at line 1596 of file rpc_server.c.

1597{
1598 TRACE("(Binding == (RPC_BINDING_HANDLE)^%p)\n", Binding);
1599
1600 if (Binding) {
1601 FIXME("client-side invocation not implemented.\n");
1603 }
1604
1605 return RPCRT4_stop_listen(FALSE);
1606}
static RPC_STATUS RPCRT4_stop_listen(BOOL auto_listen)
Definition: rpc_server.c:781

Referenced by _ServiceControlHandlerEx(), RpcpStopRpcServer(), RpcpStopRpcServerEx(), s_stop(), SamrShutdownSamServer(), service_handler(), ServiceControlHandler(), ShutdownRpc(), test_rpc_ncacn_ip_tcp(), test_server_listening(), and test_stop_wait_for_call().

◆ RpcMgmtWaitServerListen()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcMgmtWaitServerListen ( void  )

Definition at line 1539 of file rpc_server.c.

1540{
1541 RpcServerProtseq *protseq;
1542 HANDLE event, wait_thread;
1543
1544 TRACE("()\n");
1545
1547 event = listen_done_event;
1549
1550 if (!event)
1551 return RPC_S_NOT_LISTENING;
1552
1553 TRACE( "waiting for server calls to finish\n" );
1555 TRACE( "done waiting\n" );
1556
1558 /* wait for server threads to finish */
1559 while(1)
1560 {
1561 if (listen_count)
1562 break;
1563
1564 wait_thread = NULL;
1567 {
1568 if ((wait_thread = protseq->server_thread))
1569 {
1570 protseq->server_thread = NULL;
1571 break;
1572 }
1573 }
1575 if (!wait_thread)
1576 break;
1577
1578 TRACE("waiting for thread %lu\n", GetThreadId(wait_thread));
1580 WaitForSingleObject(wait_thread, INFINITE);
1581 CloseHandle(wait_thread);
1583 }
1584 if (listen_done_event == event)
1585 {
1587 CloseHandle( event );
1588 }
1590 return RPC_S_OK;
1591}
#define CloseHandle
Definition: compat.h:739
#define INFINITE
Definition: serial.h:102
struct _cl_event * event
Definition: glext.h:7739
uint32_t entry
Definition: isohybrid.c:63
static LONG listen_count
Definition: rpc_server.c:103
static CRITICAL_SECTION server_cs
Definition: rpc_server.c:73
static struct list protseqs
Definition: rpc_server.c:69
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
HANDLE server_thread
Definition: rpc_server.h:41
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82

Referenced by RpcpStopRpcServer(), RpcpStopRpcServerEx(), RpcServerListen(), run_server(), server(), test_rpc_ncacn_ip_tcp(), test_server_listening(), and wait_listen_proc().

◆ RpcNetworkInqProtseqsA()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcNetworkInqProtseqsA ( RPC_PROTSEQ_VECTORA **  protseqs)

Definition at line 3943 of file rpc_transport.c.

3944{
3945 RPC_PROTSEQ_VECTORA *pvector;
3946 unsigned int i;
3948
3949 TRACE("(%p)\n", protseqs);
3950
3951 *protseqs = malloc(sizeof(RPC_PROTSEQ_VECTORW) + sizeof(unsigned char*) * ARRAY_SIZE(protseq_list));
3952 if (!*protseqs)
3953 goto end;
3954 pvector = *protseqs;
3955 pvector->Count = 0;
3956 for (i = 0; i < ARRAY_SIZE(protseq_list); i++)
3957 {
3958 pvector->Protseq[i] = malloc(strlen(protseq_list[i].name) + 1);
3959 if (pvector->Protseq[i] == NULL)
3960 goto end;
3961 strcpy((char*)pvector->Protseq[i], protseq_list[i].name);
3962 pvector->Count++;
3963 }
3964 status = RPC_S_OK;
3965
3966end:
3967 if (status != RPC_S_OK)
3969 return status;
3970}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
GLuint GLuint end
Definition: gl.h:1545
RPC_STATUS WINAPI RpcProtseqVectorFreeA(RPC_PROTSEQ_VECTORA **protseqs)
static const struct protseq_ops protseq_list[]
strcpy
Definition: string.h:131
unsigned char * Protseq[1]
Definition: rpcdce.h:91
unsigned int Count
Definition: rpcdce.h:90
Definition: name.c:39

◆ RpcNetworkInqProtseqsW()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcNetworkInqProtseqsW ( RPC_PROTSEQ_VECTORW **  protseqs)

Definition at line 3910 of file rpc_transport.c.

3911{
3912 RPC_PROTSEQ_VECTORW *pvector;
3913 unsigned int i;
3915
3916 TRACE("(%p)\n", protseqs);
3917
3918 *protseqs = malloc(sizeof(RPC_PROTSEQ_VECTORW) + sizeof(unsigned short*) * ARRAY_SIZE(protseq_list));
3919 if (!*protseqs)
3920 goto end;
3921 pvector = *protseqs;
3922 pvector->Count = 0;
3923 for (i = 0; i < ARRAY_SIZE(protseq_list); i++)
3924 {
3925 pvector->Protseq[i] = malloc((strlen(protseq_list[i].name) + 1) * sizeof(unsigned short));
3926 if (pvector->Protseq[i] == NULL)
3927 goto end;
3929 (WCHAR*)pvector->Protseq[i], strlen(protseq_list[i].name) + 1);
3930 pvector->Count++;
3931 }
3932 status = RPC_S_OK;
3933
3934end:
3935 if (status != RPC_S_OK)
3937 return status;
3938}
RPC_STATUS WINAPI RpcProtseqVectorFreeW(RPC_PROTSEQ_VECTORW **protseqs)
unsigned int Count
Definition: rpcdce.h:96
unsigned short * Protseq[1]
Definition: rpcdce.h:97
char CHAR
Definition: xmlstorage.h:175

◆ RpcNetworkIsProtseqValidA()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcNetworkIsProtseqValidA ( RPC_CSTR  protseq)

Definition at line 3858 of file rpc_transport.c.

3859{
3860 UNICODE_STRING protseqW;
3861
3862 if (RtlCreateUnicodeStringFromAsciiz(&protseqW, (char*)protseq))
3863 {
3865 RtlFreeUnicodeString(&protseqW);
3866 return ret;
3867 }
3868 return RPC_S_OUT_OF_MEMORY;
3869}
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
RPC_STATUS WINAPI RpcNetworkIsProtseqValidW(RPC_WSTR protseq)

Referenced by test_rpc_ncacn_ip_tcp().

◆ RpcNetworkIsProtseqValidW()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcNetworkIsProtseqValidW ( RPC_WSTR  protseq)

Definition at line 3841 of file rpc_transport.c.

3842{
3843 char ps[0x10];
3844
3845 WideCharToMultiByte(CP_ACP, 0, protseq, -1,
3846 ps, sizeof ps, NULL, NULL);
3848 return RPC_S_OK;
3849
3850 FIXME("Unknown protseq %s\n", debugstr_w(protseq));
3851
3853}
static const struct connection_ops * rpcrt4_get_conn_protseq_ops(const char *protseq)
#define RPC_S_INVALID_RPC_PROTSEQ
Definition: winerror.h:1371

Referenced by RpcNetworkIsProtseqValidA().

◆ RpcObjectSetType()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcObjectSetType ( UUID ObjUuid,
UUID TypeUuid 
)

Definition at line 1281 of file rpc_server.c.

1282{
1285
1286 TRACE("(ObjUUID == %s, TypeUuid == %s).\n", debugstr_guid(ObjUuid), debugstr_guid(TypeUuid));
1287 if ((! ObjUuid) || UuidIsNil(ObjUuid, &dummy)) {
1288 /* nil uuid cannot be remapped */
1289 return RPC_S_INVALID_OBJECT;
1290 }
1291
1292 /* find the mapping for this object if there is one ... */
1293 while (map) {
1294 if (! UuidCompare(ObjUuid, &map->Object, &dummy)) break;
1295 prev = map;
1296 map = map->next;
1297 }
1298 if ((! TypeUuid) || UuidIsNil(TypeUuid, &dummy)) {
1299 /* ... and drop it from the list */
1300 if (map) {
1301 if (prev)
1302 prev->next = map->next;
1303 else
1304 RpcObjTypeMaps = map->next;
1305 free(map);
1306 }
1307 } else {
1308 /* ... , fail if we found it ... */
1309 if (map)
1311 /* ... otherwise create a new one and add it in. */
1312 map = malloc(sizeof(RpcObjTypeMap));
1313 map->Object = *ObjUuid;
1314 map->Type = *TypeUuid;
1315 map->next = NULL;
1316 if (prev)
1317 prev->next = map; /* prev is the last map in the linklist */
1318 else
1320 }
1321
1322 return RPC_S_OK;
1323}
Definition: _map.h:48
static RpcObjTypeMap * RpcObjTypeMaps
Definition: rpc_server.c:66
int WINAPI UuidCompare(UUID *Uuid1, UUID *Uuid2, RPC_STATUS *Status)
Definition: rpcrt4_main.c:234
struct define * next
Definition: compiler.c:65
#define RPC_S_ALREADY_REGISTERED
Definition: winerror.h:1378
#define RPC_S_INVALID_OBJECT
Definition: winerror.h:1503

◆ RpcProtseqVectorFreeA()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcProtseqVectorFreeA ( RPC_PROTSEQ_VECTORA **  protseqs)

Definition at line 3874 of file rpc_transport.c.

3875{
3876 TRACE("(%p)\n", protseqs);
3877
3878 if (*protseqs)
3879 {
3880 unsigned int i;
3881 for (i = 0; i < (*protseqs)->Count; i++)
3882 free((*protseqs)->Protseq[i]);
3883 free(*protseqs);
3884 *protseqs = NULL;
3885 }
3886 return RPC_S_OK;
3887}

Referenced by RpcNetworkInqProtseqsA().

◆ RpcProtseqVectorFreeW()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcProtseqVectorFreeW ( RPC_PROTSEQ_VECTORW **  protseqs)

Definition at line 3892 of file rpc_transport.c.

3893{
3894 TRACE("(%p)\n", protseqs);
3895
3896 if (*protseqs)
3897 {
3898 unsigned int i;
3899 for (i = 0; i < (*protseqs)->Count; i++)
3900 free((*protseqs)->Protseq[i]);
3901 free(*protseqs);
3902 *protseqs = NULL;
3903 }
3904 return RPC_S_OK;
3905}

Referenced by RpcNetworkInqProtseqsW().

◆ RpcRaiseException()

RPCRTAPI DECLSPEC_NORETURN void RPC_ENTRY RpcRaiseException ( RPC_STATUS  exception)

Definition at line 213 of file rpcrt4_main.c.

214{
215 /* shouldn't return */
217 ERR("handler continued execution\n");
218 ExitProcess(1);
219}
VOID WINAPI RaiseException(_In_ DWORD dwExceptionCode, _In_ DWORD dwExceptionFlags, _In_ DWORD nNumberOfArguments, _In_opt_ const ULONG_PTR *lpArguments)
Definition: except.c:700
VOID WINAPI ExitProcess(IN UINT uExitCode)
Definition: proc.c:1489

Referenced by array_buffer_size(), array_compute_and_size_conformance(), array_compute_and_write_conformance(), array_free(), array_memory_size(), array_read_conformance(), array_read_variance_and_unmarshall(), array_write_variance_and_marshall(), call_buffer_sizer(), call_marshaller(), call_unmarshaller(), client_do_args(), client_free_handle(), client_get_handle(), ComplexMarshall(), ComplexUnmarshall(), convert_old_args(), CtxClose(), CtxHello(), CtxOpen(), dispatch_rpc(), do_ndr_async_client_call(), EmbeddedComplexSize(), es_data_alloc(), es_data_read(), get_arm_offset_from_union_arm_selector(), hello_CtxClose(), hello_CtxHello(), hello_CtxOpen(), HMETAFILEPICT_UserUnmarshal(), LPSAFEARRAY_UserMarshal(), LPSAFEARRAY_UserSize(), LPSAFEARRAY_UserUnmarshal(), m_CtxClose(), m_CtxHello(), m_CtxOpen(), mes_proc_header_unmarshal(), ndr_client_call(), NdrAllocate(), NdrAsyncServerCall(), NdrBaseTypeMarshall(), NDRCContextBinding(), NDRCContextUnmarshall(), NdrClientContextMarshall(), NdrClientContextUnmarshall(), NdrComplexArrayBufferSize(), NdrComplexArrayFree(), NdrComplexArrayMarshall(), NdrComplexArrayMemorySize(), NdrComplexArrayUnmarshall(), NdrConformantArrayBufferSize(), NdrConformantArrayFree(), NdrConformantArrayMarshall(), NdrConformantArrayMemorySize(), NdrConformantArrayUnmarshall(), NdrConformantStringBufferSize(), NdrConformantStringMarshall(), NdrConformantStringMemorySize(), NdrConformantStringUnmarshall(), NdrConformantStructBufferSize(), NdrConformantStructFree(), NdrConformantStructMarshall(), NdrConformantStructUnmarshall(), NdrConformantVaryingArrayBufferSize(), NdrConformantVaryingArrayFree(), NdrConformantVaryingArrayMarshall(), NdrConformantVaryingArrayMemorySize(), NdrConformantVaryingArrayUnmarshall(), NdrConformantVaryingStructBufferSize(), NdrConformantVaryingStructFree(), NdrConformantVaryingStructMarshall(), NdrConformantVaryingStructMemorySize(), NdrConformantVaryingStructUnmarshall(), NdrContextHandleBufferSize(), NdrContextHandleMarshall(), NdrContextHandleUnmarshall(), NdrFixedArrayBufferSize(), NdrFixedArrayFree(), NdrFixedArrayMarshall(), NdrFixedArrayMemorySize(), NdrFixedArrayUnmarshall(), NdrGetBuffer(), NdrInterfacePointerMarshall(), NdrInterfacePointerUnmarshall(), NdrMesProcEncodeDecode(), NdrNonConformantStringBufferSize(), NdrNonConformantStringMarshall(), NdrNonConformantStringMemorySize(), NdrNonConformantStringUnmarshall(), NdrpCompleteAsyncServerCall(), NdrPointerUnmarshall(), NdrProxyGetBuffer(), NdrProxyInitialize(), NdrProxySendReceive(), NdrRangeBufferSize(), NdrRangeMarshall(), NdrRangeMemorySize(), NdrRangeUnmarshall(), NDRSContextMarshall2(), NDRSContextUnmarshall2(), NdrSendReceive(), NdrServerContextMarshall(), NdrServerContextNewMarshall(), NdrServerContextNewUnmarshall(), NdrServerContextUnmarshall(), NdrStubCall2(), NdrStubForwardingFunction(), NdrStubGetBuffer(), NdrVaryingArrayBufferSize(), NdrVaryingArrayFree(), NdrVaryingArrayMarshall(), NdrVaryingArrayMemorySize(), NdrVaryingArrayUnmarshall(), PointerBufferSize(), PointerMarshall(), PointerMemorySize(), PointerUnmarshall(), PSAMPR_SERVER_NAME_bind(), ReadConformance(), ReadVariance(), RpcSsDestroyClientContext(), safe_buffer_increment(), safe_buffer_length_increment(), safe_copy_from_buffer(), safe_copy_to_buffer(), safe_multiply(), SAFEARRAY_GetUnionType(), SizeConformance(), SizeVariance(), STGMEDIUM_UserUnmarshal(), stub_do_args(), type_stack_size(), union_arm_marshall(), union_arm_unmarshall(), validate_string_data(), WriteConformance(), and WriteVariance().

◆ RpcRevertToSelf()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcRevertToSelf ( void  )

Definition at line 1445 of file rpc_binding.c.

1446{
1447 TRACE("\n");
1448 return RpcRevertToSelfEx(NULL);
1449}
RPC_STATUS WINAPI RpcRevertToSelfEx(RPC_BINDING_HANDLE BindingHandle)
Definition: rpc_binding.c:1071

Referenced by _RpcAbortPrinter(), _RpcAddForm(), _RpcAddJob(), _RpcAddMonitor(), _RpcAddPort(), _RpcAddPortEx(), _RpcAddPrinterDriver(), _RpcAddPrinterDriverEx(), _RpcAddPrintProcessor(), _RpcAddPrintProvidor(), _RpcClosePrinter(), _RpcCloseSpoolFileHandle(), _RpcCommitSpoolData(), _RpcCommitSpoolData2(), _RpcConfigurePort(), _RpcDeleteForm(), _RpcDeleteMonitor(), _RpcDeletePort(), _RpcDeletePrinter(), _RpcDeletePrinterDriver(), _RpcDeletePrinterDriverEx(), _RpcDeletePrintProcessor(), _RpcDeletePrintProvidor(), _RpcEndDocPrinter(), _RpcEndPagePrinter(), _RpcEnumForms(), _RpcEnumJobs(), _RpcEnumMonitors(), _RpcEnumPorts(), _RpcEnumPrinterDrivers(), _RpcEnumPrinters(), _RpcEnumPrintProcessorDatatypes(), _RpcEnumPrintProcessors(), _RpcGetForm(), _RpcGetJob(), _RpcGetPrinter(), _RpcGetPrinterDataEx(), _RpcGetPrinterDriver(), _RpcGetPrinterDriver2(), _RpcGetPrinterDriverDirectory(), _RpcGetPrintProcessorDirectory(), _RpcGetSpoolFileInfo(), _RpcGetSpoolFileInfo2(), _RpcOpenPrinter(), _RpcPrinterMessageBox(), _RpcReadPrinter(), _RpcResetPrinterEx(), _RpcScheduleJob(), _RpcSeekPrinter(), _RpcSetForm(), _RpcSetJob(), _RpcSetPort(), _RpcSetPrinterDataEx(), _RpcSpoolerInit(), _RpcStartDocPrinter(), _RpcStartPagePrinter(), _RpcWritePrinter(), _RpcXcvData(), IsCallerInteractive(), LsarSetSecurityObject(), NetpGetClientLogonId(), RSetServiceObjectSecurity(), s_authinfo_test(), and YGetPrinterDriver2().

◆ RpcRevertToSelfEx()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcRevertToSelfEx ( RPC_BINDING_HANDLE  Binding)

Definition at line 1071 of file rpc_binding.c.

1072{
1074
1075 TRACE("(%p)\n", BindingHandle);
1076
1079
1081 if (bind->FromConn)
1082 return rpcrt4_conn_revert_to_self(bind->FromConn);
1084}
static RPC_STATUS rpcrt4_conn_revert_to_self(RpcConnection *conn)
Definition: rpc_binding.h:243

Referenced by RpcRevertToSelf().

◆ RpcServerInqBindings()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerInqBindings ( RPC_BINDING_VECTOR **  BindingVector)

Definition at line 863 of file rpc_server.c.

864{
866 DWORD count;
868 RpcConnection* conn;
869
870 if (BindingVector)
871 TRACE("(*BindingVector == ^%p)\n", *BindingVector);
872 else
873 ERR("(BindingVector == NULL!!?)\n");
874
876 /* count connections */
877 count = 0;
880 LIST_FOR_EACH_ENTRY(conn, &ps->listeners, RpcConnection, protseq_entry)
881 count++;
883 }
884 if (count) {
885 /* export bindings */
886 *BindingVector = malloc(sizeof(RPC_BINDING_VECTOR) + sizeof(RPC_BINDING_HANDLE) * (count - 1));
887 (*BindingVector)->Count = count;
888 count = 0;
891 LIST_FOR_EACH_ENTRY(conn, &ps->listeners, RpcConnection, protseq_entry) {
892 RPCRT4_MakeBinding((RpcBinding**)&(*BindingVector)->BindingH[count],
893 conn);
894 count++;
895 }
897 }
899 } else {
900 *BindingVector = NULL;
902 }
904 return status;
905}
RPC_STATUS RPCRT4_MakeBinding(RpcBinding **Binding, RpcConnection *Connection)
Definition: rpc_binding.c:215
struct list listeners
Definition: rpc_server.h:36
CRITICAL_SECTION cs
Definition: rpc_server.h:38
#define RPC_S_NO_BINDINGS
Definition: winerror.h:1385

Referenced by test_endpoint_mapper(), and test_RpcServerUseProtseq().

◆ RpcServerInqDefaultPrincNameA()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerInqDefaultPrincNameA ( ULONG  AuthnSvc,
RPC_CSTR PrincName 
)

Definition at line 1481 of file rpc_server.c.

1482{
1484 RPC_WSTR principalW;
1485
1486 TRACE("%lu, %p\n", AuthnSvc, PrincName);
1487
1488 if ((ret = RpcServerInqDefaultPrincNameW( AuthnSvc, &principalW )) == RPC_S_OK)
1489 {
1490 if (!(*PrincName = (RPC_CSTR)RPCRT4_strdupWtoA( principalW ))) return RPC_S_OUT_OF_MEMORY;
1491 RpcStringFreeW( &principalW );
1492 }
1493 return ret;
1494}
RPC_STATUS RPC_ENTRY RpcServerInqDefaultPrincNameW(ULONG AuthnSvc, RPC_WSTR *PrincName)
Definition: rpc_server.c:1499

Referenced by test_RpcServerInqDefaultPrincName().

◆ RpcServerInqDefaultPrincNameW()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerInqDefaultPrincNameW ( ULONG  AuthnSvc,
RPC_WSTR PrincName 
)

Definition at line 1499 of file rpc_server.c.

1500{
1501 ULONG len = 0;
1502
1503 FIXME("%lu, %p\n", AuthnSvc, PrincName);
1504
1505 if (AuthnSvc != RPC_C_AUTHN_WINNT) return RPC_S_UNKNOWN_AUTHN_SERVICE;
1506
1507 GetUserNameExW( NameSamCompatible, NULL, &len );
1509
1510 if (!(*PrincName = malloc(len * sizeof(WCHAR))))
1511 return RPC_S_OUT_OF_MEMORY;
1512
1513 GetUserNameExW( NameSamCompatible, *PrincName, &len );
1514 return RPC_S_OK;
1515}
#define ERROR_MORE_DATA
Definition: dderror.h:13
BOOLEAN WINAPI GetUserNameExW(EXTENDED_NAME_FORMAT NameFormat, LPWSTR lpNameBuffer, PULONG nSize)
Definition: sspi.c:1079
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define RPC_S_INTERNAL_ERROR
Definition: winerror.h:1431

Referenced by RpcServerInqDefaultPrincNameA().

◆ RpcServerListen()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerListen ( unsigned int  MinimumCallThreads,
unsigned int  MaxCalls,
unsigned int  DontWait 
)

◆ RpcServerRegisterAuthInfoA()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerRegisterAuthInfoA ( RPC_CSTR  ServerPrincName,
ULONG  AuthnSvc,
RPC_AUTH_KEY_RETRIEVAL_FN  GetKeyFn,
void Arg 
)

◆ RpcServerRegisterAuthInfoW()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerRegisterAuthInfoW ( RPC_WSTR  ServerPrincName,
ULONG  AuthnSvc,
RPC_AUTH_KEY_RETRIEVAL_FN  GetKeyFn,
void Arg 
)

◆ RpcServerRegisterIf()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerRegisterIf ( RPC_IF_HANDLE  IfSpec,
UUID MgrTypeUuid,
RPC_MGR_EPV MgrEpv 
)

Definition at line 1116 of file rpc_server.c.

1117{
1118 TRACE("(%p,%s,%p)\n", IfSpec, debugstr_guid(MgrTypeUuid), MgrEpv);
1119 return RpcServerRegisterIf3( IfSpec, MgrTypeUuid, MgrEpv, 0, RPC_C_LISTEN_MAX_CALLS_DEFAULT, (UINT)-1, NULL, NULL );
1120}
unsigned int UINT
Definition: ndis.h:50
RPC_STATUS WINAPI RpcServerRegisterIf3(RPC_IF_HANDLE IfSpec, UUID *MgrTypeUuid, RPC_MGR_EPV *MgrEpv, UINT Flags, UINT MaxCalls, UINT MaxRpcSize, RPC_IF_CALLBACK_FN *IfCallbackFn, void *SecurityDescriptor)
Definition: rpc_server.c:1144
#define RPC_C_LISTEN_MAX_CALLS_DEFAULT
Definition: rpcdce.h:122

Referenced by DsSetupInit(), LrpcThreadProc(), LsarStartRpcServer(), main(), RpcpAddInterface(), RpcServerThread(), RPCSS_Initialize(), RpcThreadRoutine(), run_server(), SampStartRpcServer(), ScmStartRpcServer(), server(), StartRpcServer(), test_endpoint_mapper(), test_ndr_buffer(), test_rpc_ncacn_ip_tcp(), and test_server_listening().

◆ RpcServerRegisterIf2()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerRegisterIf2 ( RPC_IF_HANDLE  IfSpec,
UUID MgrTypeUuid,
RPC_MGR_EPV MgrEpv,
unsigned int  Flags,
unsigned int  MaxCalls,
unsigned int  MaxRpcSize,
RPC_IF_CALLBACK_FN IfCallbackFn 
)

◆ RpcServerRegisterIf3()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerRegisterIf3 ( RPC_IF_HANDLE  IfSpec,
UUID MgrTypeUuid,
RPC_MGR_EPV MgrEpv,
unsigned int  Flags,
unsigned int  MaxCalls,
unsigned int  MaxRpcSize,
RPC_IF_CALLBACK_FN IfCallbackFn,
void SecurityDescriptor 
)

◆ RpcServerRegisterIfEx()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerRegisterIfEx ( RPC_IF_HANDLE  IfSpec,
UUID MgrTypeUuid,
RPC_MGR_EPV MgrEpv,
unsigned int  Flags,
unsigned int  MaxCalls,
RPC_IF_CALLBACK_FN IfCallbackFn 
)

◆ RpcServerUnregisterIf()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerUnregisterIf ( RPC_IF_HANDLE  IfSpec,
UUID MgrTypeUuid,
unsigned int  WaitForCallsToComplete 
)

◆ RpcServerUnregisterIfEx()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerUnregisterIfEx ( RPC_IF_HANDLE  IfSpec,
UUID MgrTypeUuid,
int  RundownContextHandles 
)

Definition at line 1253 of file rpc_server.c.

1254{
1255 FIXME("(IfSpec == (RPC_IF_HANDLE)^%p, MgrTypeUuid == %s, RundownContextHandles == %d): stub\n",
1256 IfSpec, debugstr_guid(MgrTypeUuid), RundownContextHandles);
1257
1258 return RPC_S_OK;
1259}

Referenced by RpcpStopRpcServerEx().

◆ RpcServerUseProtseqA()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerUseProtseqA ( RPC_CSTR  Protseq,
unsigned int  MaxCalls,
void SecurityDescriptor 
)

Definition at line 1060 of file rpc_server.c.

1061{
1063 RpcServerProtseq* ps;
1064
1065 TRACE("(Protseq == %s, MaxCalls == %d, SecurityDescriptor == ^%p)\n", debugstr_a((char*)Protseq), MaxCalls, SecurityDescriptor);
1066
1067 status = RPCRT4_get_or_create_serverprotseq(MaxCalls, (const char *)Protseq, &ps);
1068 if (status != RPC_S_OK)
1069 return status;
1070
1071 return RPCRT4_use_protseq(ps, NULL);
1072}
static RPC_STATUS RPCRT4_get_or_create_serverprotseq(UINT MaxCalls, const char *Protseq, RpcServerProtseq **ps)
Definition: rpc_server.c:987
static RPC_STATUS RPCRT4_use_protseq(RpcServerProtseq *ps, const char *endpoint)
Definition: rpc_server.c:834
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH _In_opt_ PEPROCESS _In_opt_ PETHREAD _In_opt_ PSECURITY_DESCRIPTOR SecurityDescriptor
Definition: wsk.h:191

Referenced by test_RpcServerUseProtseq().

◆ RpcServerUseProtseqEpA()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerUseProtseqEpA ( RPC_CSTR  Protseq,
unsigned int  MaxCalls,
RPC_CSTR  Endpoint,
void SecurityDescriptor 
)

◆ RpcServerUseProtseqEpExA()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerUseProtseqEpExA ( RPC_CSTR  Protseq,
unsigned int  MaxCalls,
RPC_CSTR  Endpoint,
void SecurityDescriptor,
PRPC_POLICY  Policy 
)

◆ RpcServerUseProtseqEpExW()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerUseProtseqEpExW ( RPC_WSTR  Protseq,
unsigned int  MaxCalls,
RPC_WSTR  Endpoint,
void SecurityDescriptor,
PRPC_POLICY  Policy 
)

◆ RpcServerUseProtseqEpW()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerUseProtseqEpW ( RPC_WSTR  Protseq,
unsigned int  MaxCalls,
RPC_WSTR  Endpoint,
void SecurityDescriptor 
)

◆ RpcServerUseProtseqW()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerUseProtseqW ( RPC_WSTR  Protseq,
unsigned int  MaxCalls,
void SecurityDescriptor 
)

Definition at line 1077 of file rpc_server.c.

1078{
1080 RpcServerProtseq* ps;
1081 LPSTR ProtseqA;
1082
1083 TRACE("Protseq == %s, MaxCalls == %d, SecurityDescriptor == ^%p)\n", debugstr_w(Protseq), MaxCalls, SecurityDescriptor);
1084
1085 ProtseqA = RPCRT4_strdupWtoA(Protseq);
1086 status = RPCRT4_get_or_create_serverprotseq(MaxCalls, ProtseqA, &ps);
1087 free(ProtseqA);
1088 if (status != RPC_S_OK)
1089 return status;
1090
1091 return RPCRT4_use_protseq(ps, NULL);
1092}

◆ RpcStringBindingComposeA()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcStringBindingComposeA ( RPC_CSTR  ObjUuid,
RPC_CSTR  Protseq,
RPC_CSTR  NetworkAddr,
RPC_CSTR  Endpoint,
RPC_CSTR  Options,
RPC_CSTR StringBinding 
)

Definition at line 440 of file rpc_binding.c.

443{
444 DWORD len = 1;
446
447 TRACE( "(%s,%s,%s,%s,%s,%p)\n",
448 debugstr_a( (char*)ObjUuid ), debugstr_a( (char*)Protseq ),
449 debugstr_a( (char*)NetworkAddr ), debugstr_a( (char*)Endpoint ),
450 debugstr_a( (char*)Options ), StringBinding );
451
452 /* overestimate for each component for escaping of delimiters */
453 if (ObjUuid && *ObjUuid) len += strlen((char*)ObjUuid) * 2 + 1;
454 if (Protseq && *Protseq) len += strlen((char*)Protseq) * 2 + 1;
455 if (NetworkAddr && *NetworkAddr) len += strlen((char*)NetworkAddr) * 2;
456 if (Endpoint && *Endpoint) len += strlen((char*)Endpoint) * 2 + 2;
457 if (Options && *Options) len += strlen((char*)Options) * 2 + 2;
458
459 data = malloc(len);
460 *StringBinding = data;
461
462 if (ObjUuid && *ObjUuid) {
464 *data++ = '@';
465 }
466 if (Protseq && *Protseq) {
468 *data++ = ':';
469 }
470 if (NetworkAddr && *NetworkAddr)
472
473 if ((Endpoint && *Endpoint) ||
474 (Options && *Options)) {
475 *data++ = '[';
476 if (Endpoint && *Endpoint) {
478 if (Options && *Options) *data++ = ',';
479 }
480 if (Options && *Options) {
482 }
483 *data++ = ']';
484 }
485 *data = 0;
486
487 return RPC_S_OK;
488}
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
static RPC_CSTR escape_string_binding_component(RPC_CSTR string_binding, const unsigned char *component)
Definition: rpc_binding.c:321

Referenced by client(), EVENTLOG_HANDLE_A_bind(), RpcBindingToStringBindingA(), SVCCTL_HANDLEA_bind(), test_endpoint_mapper(), test_ndr_buffer(), test_reconnect(), test_rpc_ncacn_ip_tcp(), test_RpcStringBindingFromBinding(), and test_server_listening().

◆ RpcStringBindingComposeW()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcStringBindingComposeW ( RPC_WSTR  ObjUuid,
RPC_WSTR  Protseq,
RPC_WSTR  NetworkAddr,
RPC_WSTR  Endpoint,
RPC_WSTR  Options,
RPC_WSTR StringBinding 
)

Definition at line 493 of file rpc_binding.c.

496{
497 DWORD len = 1;
499
500 TRACE("(%s,%s,%s,%s,%s,%p)\n",
501 debugstr_w( ObjUuid ), debugstr_w( Protseq ),
502 debugstr_w( NetworkAddr ), debugstr_w( Endpoint ),
503 debugstr_w( Options ), StringBinding);
504
505 /* overestimate for each component for escaping of delimiters */
506 if (ObjUuid && *ObjUuid) len += lstrlenW(ObjUuid) * 2 + 1;
507 if (Protseq && *Protseq) len += lstrlenW(Protseq) * 2 + 1;
508 if (NetworkAddr && *NetworkAddr) len += lstrlenW(NetworkAddr) * 2;
509 if (Endpoint && *Endpoint) len += lstrlenW(Endpoint) * 2 + 2;
510 if (Options && *Options) len += lstrlenW(Options) * 2 + 2;
511
512 data = malloc(len * sizeof(WCHAR));
513 *StringBinding = data;
514
515 if (ObjUuid && *ObjUuid) {
517 *data++ = '@';
518 }
519 if (Protseq && *Protseq) {
521 *data++ = ':';
522 }
523 if (NetworkAddr && *NetworkAddr) {
525 }
526 if ((Endpoint && *Endpoint) ||
527 (Options && *Options)) {
528 *data++ = '[';
529 if (Endpoint && *Endpoint) {
531 if (Options && *Options) *data++ = ',';
532 }
533 if (Options && *Options) {
535 }
536 *data++ = ']';
537 }
538 *data = 0;
539
540 return RPC_S_OK;
541}
#define lstrlenW
Definition: compat.h:750
static RPC_WSTR escape_string_binding_componentW(RPC_WSTR string_binding, const WCHAR *component)
Definition: rpc_binding.c:342

Referenced by __wine_msi_call_dll_function(), ATSVC_HANDLE_bind(), BROWSER_IDENTIFY_HANDLE_bind(), CreateProcessWithLogonW(), DNSRSLVR_HANDLE_bind(), DsSetupBind(), EVENTLOG_HANDLE_W_bind(), get_irot_handle(), LOGONSRV_HANDLE_bind(), NetpBind(), PDHCP_SERVER_NAME_bind(), PLSAPR_SERVER_NAME_bind(), PnpBindRpc(), PREGISTRY_SERVER_NAME_bind(), PSAMPR_SERVER_NAME_bind(), RPC_CreateClientChannel(), ScCreateStatusBinding(), SRVSVC_HANDLE_bind(), SVCCTL_HANDLEW_bind(), WINSPOOL_HANDLE_bind(), WKSSVC_IDENTIFY_HANDLE_bind(), WKSSVC_IMPERSONATE_HANDLE_bind(), and WLANSVC_HANDLE_bind().

◆ RpcStringBindingParseA()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcStringBindingParseA ( RPC_CSTR  StringBinding,
RPC_CSTR ObjUuid,
RPC_CSTR Protseq,
RPC_CSTR NetworkAddr,
RPC_CSTR Endpoint,
RPC_CSTR NetworkOptions 
)

Definition at line 547 of file rpc_binding.c.

550{
551 const unsigned char *data, *next;
552 static const char ep_opt[] = "endpoint=";
553 BOOL endpoint_already_found = FALSE;
554
555 TRACE("(%s,%p,%p,%p,%p,%p)\n", debugstr_a((char*)StringBinding),
556 ObjUuid, Protseq, NetworkAddr, Endpoint, Options);
557
558 if (ObjUuid) *ObjUuid = NULL;
559 if (Protseq) *Protseq = NULL;
560 if (NetworkAddr) *NetworkAddr = NULL;
561 if (Endpoint) *Endpoint = NULL;
562 if (Options) *Options = NULL;
563
564 data = StringBinding;
565
567 if (next) {
568 UUID uuid;
571 status = UuidFromStringA(str_uuid, &uuid);
572 if (status != RPC_S_OK) {
573 free(str_uuid);
574 return status;
575 }
576 if (ObjUuid)
577 *ObjUuid = str_uuid;
578 else
579 free(str_uuid);
580 data = next+1;
581 }
582
584 if (next) {
585 if (Protseq) *Protseq = unescape_string_binding_component(data, next - data);
586 data = next+1;
587 } else {
588 goto fail;
589 }
590
592 if (next) {
593 const unsigned char *close;
594 RPC_CSTR opt;
595
596 if (NetworkAddr) *NetworkAddr = unescape_string_binding_component(data, next - data);
597 data = next+1;
599 if (!close) goto fail;
600
601 /* tokenize options */
602 while (data < close) {
604 if (!next || next > close) next = close;
605 /* FIXME: this is kind of inefficient */
607 data = next+1;
608
609 /* parse option */
611 if (!next) {
612 /* not an option, must be an endpoint */
613 if (endpoint_already_found) goto fail;
614 if (Endpoint) *Endpoint = opt;
615 else free(opt);
616 endpoint_already_found = TRUE;
617 } else {
618 if (strncmp((const char *)opt, ep_opt, strlen(ep_opt)) == 0) {
619 /* endpoint option */
620 if (endpoint_already_found) goto fail;
621 if (Endpoint) *Endpoint = unescape_string_binding_component(next+1, -1);
622 free(opt);
623 endpoint_already_found = TRUE;
624 } else {
625 /* network option */
626 if (Options) {
627 if (*Options) {
628 /* FIXME: this is kind of inefficient */
629 *Options = (unsigned char*) RPCRT4_strconcatA( (char*)*Options, (char *)opt);
630 free(opt);
631 } else
632 *Options = opt;
633 } else
634 free(opt);
635 }
636 }
637 }
638
639 data = close+1;
640 if (*data) goto fail;
641 }
642 else if (NetworkAddr)
643 *NetworkAddr = unescape_string_binding_component(data, -1);
644
645 return RPC_S_OK;
646
647fail:
648 if (ObjUuid) RpcStringFreeA(ObjUuid);
649 if (Protseq) RpcStringFreeA(Protseq);
650 if (NetworkAddr) RpcStringFreeA(NetworkAddr);
651 if (Endpoint) RpcStringFreeA(Endpoint);
654}
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
Definition: utclib.c:534
#define close
Definition: acwin.h:98
unsigned int BOOL
Definition: ntddk_ex.h:94
static unsigned __int64 next
Definition: rand_nt.c:6
static LPSTR RPCRT4_strconcatA(LPSTR dst, LPCSTR src)
Definition: rpc_binding.c:291
static const unsigned char * string_binding_find_delimiter(const unsigned char *string_binding, unsigned char delim)
Definition: rpc_binding.c:363
static RPC_CSTR unescape_string_binding_component(const unsigned char *string_binding, int len)
Definition: rpc_binding.c:393
#define RPC_S_INVALID_STRING_BINDING
Definition: winerror.h:1367

Referenced by RpcBindingFromStringBindingA(), s_context_handle_test(), and test_RpcStringBindingParseA().

◆ RpcStringBindingParseW()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcStringBindingParseW ( RPC_WSTR  StringBinding,
RPC_WSTR ObjUuid,
RPC_WSTR Protseq,
RPC_WSTR NetworkAddr,
RPC_WSTR Endpoint,
RPC_WSTR NetworkOptions 
)

Definition at line 659 of file rpc_binding.c.

662{
663 const WCHAR *data, *next;
664 BOOL endpoint_already_found = FALSE;
665
666 TRACE("(%s,%p,%p,%p,%p,%p)\n", debugstr_w(StringBinding),
667 ObjUuid, Protseq, NetworkAddr, Endpoint, Options);
668
669 if (ObjUuid) *ObjUuid = NULL;
670 if (Protseq) *Protseq = NULL;
671 if (NetworkAddr) *NetworkAddr = NULL;
672 if (Endpoint) *Endpoint = NULL;
673 if (Options) *Options = NULL;
674
675 data = StringBinding;
676
678 if (next) {
679 UUID uuid;
682 status = UuidFromStringW(str_uuid, &uuid);
683 if (status != RPC_S_OK) {
684 free(str_uuid);
685 return status;
686 }
687 if (ObjUuid)
688 *ObjUuid = str_uuid;
689 else
690 free(str_uuid);
691 data = next+1;
692 }
693
695 if (next) {
696 if (Protseq) *Protseq = unescape_string_binding_componentW(data, next - data);
697 data = next+1;
698 } else {
699 goto fail;
700 }
701
703 if (next) {
704 const WCHAR *close;
705 RPC_WSTR opt;
706
707 if (NetworkAddr) *NetworkAddr = unescape_string_binding_componentW(data, next - data);
708 data = next+1;
710 if (!close) goto fail;
711
712 /* tokenize options */
713 while (data < close) {
715 if (!next || next > close) next = close;
716 /* FIXME: this is kind of inefficient */
718 data = next+1;
719
720 /* parse option */
722 if (!next) {
723 /* not an option, must be an endpoint */
724 if (endpoint_already_found) goto fail;
725 if (Endpoint) *Endpoint = opt;
726 else free(opt);
727 endpoint_already_found = TRUE;
728 } else {
729 if (wcsncmp(opt, L"endpoint=", lstrlenW(L"endpoint=")) == 0) {
730 /* endpoint option */
731 if (endpoint_already_found) goto fail;
732 if (Endpoint) *Endpoint = unescape_string_binding_componentW(next+1, -1);
733 free(opt);
734 endpoint_already_found = TRUE;
735 } else {
736 /* network option */
737 if (Options) {
738 if (*Options) {
739 /* FIXME: this is kind of inefficient */
741 free(opt);
742 } else
743 *Options = opt;
744 } else
745 free(opt);
746 }
747 }
748 }
749
750 data = close+1;
751 if (*data) goto fail;
752 } else if (NetworkAddr)
753 *NetworkAddr = unescape_string_binding_componentW(data, -1);
754
755 return RPC_S_OK;
756
757fail:
758 if (ObjUuid) RpcStringFreeW(ObjUuid);
759 if (Protseq) RpcStringFreeW(Protseq);
760 if (NetworkAddr) RpcStringFreeW(NetworkAddr);
761 if (Endpoint) RpcStringFreeW(Endpoint);
764}
#define L(x)
Definition: resources.c:13
static const WCHAR * string_binding_find_delimiterW(const WCHAR *string_binding, WCHAR delim)
Definition: rpc_binding.c:378
static RPC_WSTR unescape_string_binding_componentW(const WCHAR *string_binding, int len)
Definition: rpc_binding.c:415
static LPWSTR RPCRT4_strconcatW(LPWSTR dst, LPCWSTR src)
Definition: rpc_binding.c:305
_Check_return_ _CRTIMP int __cdecl wcsncmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)

Referenced by CreateJob(), and RpcBindingFromStringBindingW().

◆ RpcStringFreeA()

◆ RpcStringFreeW()

◆ UuidCompare()

RPCRTAPI signed int RPC_ENTRY UuidCompare ( UUID Uuid1,
UUID Uuid2,
RPC_STATUS Status_ 
)

Definition at line 234 of file rpcrt4_main.c.

235{
236 int i;
237
238 TRACE("(%s,%s)\n", debugstr_guid(Uuid1), debugstr_guid(Uuid2));
239
240 *Status = RPC_S_OK;
241
242 if (!Uuid1) Uuid1 = &uuid_nil;
243 if (!Uuid2) Uuid2 = &uuid_nil;
244
245 if (Uuid1 == Uuid2) return 0;
246
247 if (Uuid1->Data1 != Uuid2->Data1)
248 return Uuid1->Data1 < Uuid2->Data1 ? -1 : 1;
249
250 if (Uuid1->Data2 != Uuid2->Data2)
251 return Uuid1->Data2 < Uuid2->Data2 ? -1 : 1;
252
253 if (Uuid1->Data3 != Uuid2->Data3)
254 return Uuid1->Data3 < Uuid2->Data3 ? -1 : 1;
255
256 for (i = 0; i < 8; i++) {
257 if (Uuid1->Data4[i] < Uuid2->Data4[i])
258 return -1;
259 if (Uuid1->Data4[i] > Uuid2->Data4[i])
260 return 1;
261 }
262
263 return 0;
264}
Status
Definition: gdiplustypes.h:25
static UUID uuid_nil
Definition: rpcrt4_main.c:60

◆ UuidCreate()

RPCRTAPI RPC_STATUS RPC_ENTRY UuidCreate ( UUID Uuid)

Definition at line 330 of file rpcrt4_main.c.

331{
332 RtlGenRandom(Uuid, sizeof(*Uuid));
333 /* Clear the version bits and set the version (4) */
334 Uuid->Data3 &= 0x0fff;
335 Uuid->Data3 |= (4 << 12);
336 /* Set the topmost bits of Data4 (clock_seq_hi_and_reserved) as
337 * specified in RFC 4122, section 4.4.
338 */
339 Uuid->Data4[0] &= 0x3f;
340 Uuid->Data4[0] |= 0x80;
341
342 TRACE("%s\n", debugstr_guid(Uuid));
343
344 return RPC_S_OK;
345}
#define RtlGenRandom
Definition: ntsecapi.h:691

Referenced by AllocAndInitializeTelemetryContext(), CoCreateGuid(), CreateInstanceKey(), CRYPT_CreateMachineGuid(), generate_ipid(), GetCurrentHwProfileW(), InstallDevice(), NetClassInstaller(), RpcAssoc_Alloc(), rpcrt4_ncacn_http_open(), RpcServerAssoc_UpdateContextHandle(), test_QueryPathOfRegTypeLib(), test_UuidCreate(), and uuid_generate().

◆ UuidCreateNil()

RPCRTAPI RPC_STATUS RPC_ENTRY UuidCreateNil ( UUID Uuid)

Definition at line 309 of file rpcrt4_main.c.

310{
311 *Uuid = uuid_nil;
312 return RPC_S_OK;
313}

◆ UuidCreateSequential()

RPCRTAPI RPC_STATUS RPC_ENTRY UuidCreateSequential ( UUID Uuid)

Definition at line 415 of file rpcrt4_main.c.

416{
417 static BOOL initialised;
418 static int count;
419
421 static ULONGLONG timelast;
422 static WORD sequence;
423
424 static DWORD status;
426
428
429 if (!initialised) {
430 RPC_UuidGetSystemTime(&timelast);
432
433 sequence = ((rand() & 0xff) << 8) + (rand() & 0xff);
434 sequence &= 0x1fff;
435
437 initialised = TRUE;
438 }
439
440 /* Generate time element of the UUID. Account for going faster
441 than our clock as well as the clock going backwards. */
442 while (1) {
444 if (time > timelast) {
445 count = 0;
446 break;
447 }
448 if (time < timelast) {
449 sequence = (sequence + 1) & 0x1fff;
450 count = 0;
451 break;
452 }
454 count++;
455 break;
456 }
457 }
458
459 timelast = time;
460 time += count;
461
462 /* Pack the information into the UUID structure. */
463
464 Uuid->Data1 = (ULONG)(time & 0xffffffff);
465 Uuid->Data2 = (unsigned short)((time >> 32) & 0xffff);
466 Uuid->Data3 = (unsigned short)((time >> 48) & 0x0fff);
467
468 /* This is a version 1 UUID */
469 Uuid->Data3 |= (1 << 12);
470
471 Uuid->Data4[0] = sequence & 0xff;
472 Uuid->Data4[1] = (sequence & 0x3f00) >> 8;
473 Uuid->Data4[1] |= 0x80;
474 memcpy(&Uuid->Data4[2], address, ADDRESS_BYTES_NEEDED);
475
477
478 TRACE("%s\n", debugstr_guid(Uuid));
479
480 return status;
481}
static struct recvd_message * sequence
Definition: SystemMenu.c:63
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
Definition: typeof.h:94
unsigned short WORD
Definition: ntddk_ex.h:93
GLuint address
Definition: glext.h:9393
__u16 time
Definition: mkdosfs.c:8
#define MAX_ADAPTER_ADDRESS_LENGTH
Definition: iptypes.h:17
static CRITICAL_SECTION uuid_cs
Definition: rpcrt4_main.c:62
static RPC_STATUS RPC_UuidGetNodeAddress(BYTE *address)
Definition: rpcrt4_main.c:369
static void RPC_UuidGetSystemTime(ULONGLONG *time)
Definition: rpcrt4_main.c:356
#define TICKS_PER_CLOCK_TICK
Definition: rpcrt4_main.c:349
#define ADDRESS_BYTES_NEEDED
Definition: rpcrt4_main.c:367
_Check_return_ int __cdecl rand(void)
Definition: rand.c:10
uint64_t ULONGLONG
Definition: typedefs.h:67
unsigned char BYTE
Definition: xxhash.c:193

Referenced by I_UuidCreate().

◆ UuidEqual()

RPCRTAPI int RPC_ENTRY UuidEqual ( UUID Uuid1,
UUID Uuid2,
RPC_STATUS Status_ 
)

Definition at line 277 of file rpcrt4_main.c.

278{
279 TRACE("(%s,%s)\n", debugstr_guid(Uuid1), debugstr_guid(Uuid2));
280 return !UuidCompare(Uuid1, Uuid2, Status);
281}

◆ UuidFromStringA()

RPCRTAPI RPC_STATUS RPC_ENTRY UuidFromStringA ( RPC_CSTR  StringUuid,
UUID Uuid 
)

Definition at line 615 of file rpcrt4_main.c.

616{
617 int i;
618
619 if (!s) return UuidCreateNil( uuid );
620
621 if (strlen((char*)s) != 36) return RPC_S_INVALID_STRING_UUID;
622
623 if ((s[8]!='-') || (s[13]!='-') || (s[18]!='-') || (s[23]!='-'))
625
626 for (i=0; i<36; i++)
627 {
628 if ((i == 8)||(i == 13)||(i == 18)||(i == 23)) continue;
629 if (s[i] > 'f' || (!hex2bin[s[i]] && s[i] != '0')) return RPC_S_INVALID_STRING_UUID;
630 }
631
632 /* in form XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX */
633
634 uuid->Data1 = (hex2bin[s[0]] << 28 | hex2bin[s[1]] << 24 | hex2bin[s[2]] << 20 | hex2bin[s[3]] << 16 |
635 hex2bin[s[4]] << 12 | hex2bin[s[5]] << 8 | hex2bin[s[6]] << 4 | hex2bin[s[7]]);
636 uuid->Data2 = hex2bin[s[9]] << 12 | hex2bin[s[10]] << 8 | hex2bin[s[11]] << 4 | hex2bin[s[12]];
637 uuid->Data3 = hex2bin[s[14]] << 12 | hex2bin[s[15]] << 8 | hex2bin[s[16]] << 4 | hex2bin[s[17]];
638
639 /* these are just sequential bytes */
640 uuid->Data4[0] = hex2bin[s[19]] << 4 | hex2bin[s[20]];
641 uuid->Data4[1] = hex2bin[s[21]] << 4 | hex2bin[s[22]];
642 uuid->Data4[2] = hex2bin[s[24]] << 4 | hex2bin[s[25]];
643 uuid->Data4[3] = hex2bin[s[26]] << 4 | hex2bin[s[27]];
644 uuid->Data4[4] = hex2bin[s[28]] << 4 | hex2bin[s[29]];
645 uuid->Data4[5] = hex2bin[s[30]] << 4 | hex2bin[s[31]];
646 uuid->Data4[6] = hex2bin[s[32]] << 4 | hex2bin[s[33]];
647 uuid->Data4[7] = hex2bin[s[34]] << 4 | hex2bin[s[35]];
648 return RPC_S_OK;
649}
GLdouble s
Definition: gl.h:2039
unsigned short Data3
Definition: widltypes.h:34
unsigned int Data1
Definition: widltypes.h:32
unsigned char Data4[8]
Definition: widltypes.h:35
unsigned short Data2
Definition: widltypes.h:33
static const BYTE hex2bin[]
Definition: rpcrt4_main.c:601
RPC_STATUS WINAPI UuidCreateNil(UUID *Uuid)
Definition: rpcrt4_main.c:309
#define RPC_S_INVALID_STRING_UUID
Definition: winerror.h:1372

Referenced by RpcBindingFromStringBindingA(), RpcStringBindingParseA(), and test_UuidFromString().

◆ UuidFromStringW()

RPCRTAPI RPC_STATUS RPC_ENTRY UuidFromStringW ( RPC_WSTR  StringUuid,
UUID Uuid 
)

Definition at line 655 of file rpcrt4_main.c.

656{
657 int i;
658
659 if (!s) return UuidCreateNil( uuid );
660
661 if (lstrlenW(s) != 36) return RPC_S_INVALID_STRING_UUID;
662
663 if ((s[8]!='-') || (s[13]!='-') || (s[18]!='-') || (s[23]!='-'))
665
666 for (i=0; i<36; i++)
667 {
668 if ((i == 8)||(i == 13)||(i == 18)||(i == 23)) continue;
669 if (s[i] > 'f' || (!hex2bin[s[i]] && s[i] != '0')) return RPC_S_INVALID_STRING_UUID;
670 }
671
672 /* in form XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX */
673
674 uuid->Data1 = (hex2bin[s[0]] << 28 | hex2bin[s[1]] << 24 | hex2bin[s[2]] << 20 | hex2bin[s[3]] << 16 |
675 hex2bin[s[4]] << 12 | hex2bin[s[5]] << 8 | hex2bin[s[6]] << 4 | hex2bin[s[7]]);
676 uuid->Data2 = hex2bin[s[9]] << 12 | hex2bin[s[10]] << 8 | hex2bin[s[11]] << 4 | hex2bin[s[12]];
677 uuid->Data3 = hex2bin[s[14]] << 12 | hex2bin[s[15]] << 8 | hex2bin[s[16]] << 4 | hex2bin[s[17]];
678
679 /* these are just sequential bytes */
680 uuid->Data4[0] = hex2bin[s[19]] << 4 | hex2bin[s[20]];
681 uuid->Data4[1] = hex2bin[s[21]] << 4 | hex2bin[s[22]];
682 uuid->Data4[2] = hex2bin[s[24]] << 4 | hex2bin[s[25]];
683 uuid->Data4[3] = hex2bin[s[26]] << 4 | hex2bin[s[27]];
684 uuid->Data4[4] = hex2bin[s[28]] << 4 | hex2bin[s[29]];
685 uuid->Data4[5] = hex2bin[s[30]] << 4 | hex2bin[s[31]];
686 uuid->Data4[6] = hex2bin[s[32]] << 4 | hex2bin[s[33]];
687 uuid->Data4[7] = hex2bin[s[34]] << 4 | hex2bin[s[35]];
688 return RPC_S_OK;
689}

Referenced by CM_Enumerate_Classes_Ex(), get_token(), GetVersionInformationFromInfFile(), InitProbeListPage(), PARSER_GetInfClassW(), pSetupGuidFromString(), RpcBindingFromStringBindingW(), RpcStringBindingParseW(), SETUP_CreateDevicesList(), SETUP_CreateInterfaceList(), SetupDiClassGuidsFromNameExW(), SetupDiInstallDeviceInterfaces(), SetupDiOpenDeviceInfoW(), SetupDiOpenDeviceInterfaceW(), and test_UuidFromString().

◆ UuidHash()

RPCRTAPI unsigned short RPC_ENTRY UuidHash ( UUID Uuid,
RPC_STATUS Status_ 
)

Definition at line 501 of file rpcrt4_main.c.

502{
503 BYTE *data = (BYTE*)uuid;
504 short c0 = 0, c1 = 0, x, y;
505 unsigned int i;
506
507 if (!uuid) data = (BYTE*)(uuid = &uuid_nil);
508
509 TRACE("(%s)\n", debugstr_guid(uuid));
510
511 for (i=0; i<sizeof(UUID); i++) {
512 c0 += data[i];
513 c1 += c0;
514 }
515
516 x = -c1 % 255;
517 if (x < 0) x += 255;
518
519 y = (c1 - c0) % 255;
520 if (y < 0) y += 255;
521
522 *Status = RPC_S_OK;
523 return y*256 + x;
524}
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GUID UUID
Definition: module.h:1093

◆ UuidIsNil()

RPCRTAPI int RPC_ENTRY UuidIsNil ( UUID Uuid,
RPC_STATUS Status_ 
)

Definition at line 293 of file rpcrt4_main.c.

294{
295 TRACE("(%s)\n", debugstr_guid(Uuid));
296 if (!Uuid) return TRUE;
297 return !UuidCompare(Uuid, &uuid_nil, Status);
298}

◆ UuidToStringA()

RPCRTAPI RPC_STATUS RPC_ENTRY UuidToStringA ( UUID Uuid,
RPC_CSTR StringUuid 
)

Definition at line 539 of file rpcrt4_main.c.

540{
541 *StringUuid = malloc(37);
542
543 if(!(*StringUuid))
544 return RPC_S_OUT_OF_MEMORY;
545
546 if (!Uuid) Uuid = &uuid_nil;
547
548#ifdef __REACTOS__
549 sprintf( (char*)*StringUuid, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
550 Uuid->Data1, Uuid->Data2, Uuid->Data3,
551 Uuid->Data4[0], Uuid->Data4[1], Uuid->Data4[2],
552 Uuid->Data4[3], Uuid->Data4[4], Uuid->Data4[5],
553 Uuid->Data4[6], Uuid->Data4[7] );
554#else
555 sprintf( (char*)*StringUuid, "%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
556 Uuid->Data1, Uuid->Data2, Uuid->Data3,
557 Uuid->Data4[0], Uuid->Data4[1], Uuid->Data4[2],
558 Uuid->Data4[3], Uuid->Data4[4], Uuid->Data4[5],
559 Uuid->Data4[6], Uuid->Data4[7] );
560#endif
561
562 return RPC_S_OK;
563}
#define sprintf
Definition: sprintf.c:45

Referenced by RpcBindingToStringBindingA(), and test_UuidFromString().

◆ UuidToStringW()

RPCRTAPI RPC_STATUS RPC_ENTRY UuidToStringW ( UUID Uuid,
RPC_WSTR StringUuid 
)

Definition at line 573 of file rpcrt4_main.c.

574{
575 char buf[37];
576
577 if (!Uuid) Uuid = &uuid_nil;
578
579#ifdef __REACTOS__
580 sprintf(buf, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
581 Uuid->Data1, Uuid->Data2, Uuid->Data3,
582 Uuid->Data4[0], Uuid->Data4[1], Uuid->Data4[2],
583 Uuid->Data4[3], Uuid->Data4[4], Uuid->Data4[5],
584 Uuid->Data4[6], Uuid->Data4[7] );
585#else
586 sprintf(buf, "%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
587 Uuid->Data1, Uuid->Data2, Uuid->Data3,
588 Uuid->Data4[0], Uuid->Data4[1], Uuid->Data4[2],
589 Uuid->Data4[3], Uuid->Data4[4], Uuid->Data4[5],
590 Uuid->Data4[6], Uuid->Data4[7] );
591#endif
592
593 *StringUuid = RPCRT4_strdupAtoW(buf);
594
595 if(!(*StringUuid))
596 return RPC_S_OUT_OF_MEMORY;
597
598 return RPC_S_OK;
599}
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751

Referenced by CM_Open_Class_Key_ExW(), CreateInstanceKey(), get_settingid(), GuidToString(), NetClassInstaller(), pSetupStringFromGuid(), SETUPDI_CreateDrvKey(), SetupDiInstallDevice(), and test_UuidFromString().