/*++
Copyright (c) 1991-1999 Microsoft Corporation
Module Name:
rpcdce.h
Abstract:
This module contains the DCE RPC runtime APIs.
--*/
#ifndef __RPCDCE_H__
#pragma option push -b -a8 -pc -A- /*P_O_Push*/
#define __RPCDCE_H__
#if _MSC_VER > 1000
#pragma once
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifndef IN
#define IN
#endif
#ifndef OUT
#define OUT
#endif
#ifndef OPTIONAL
#define OPTIONAL
#endif
/*typedef char small;*/
/*typedef unsigned char byte;*/
/*typedef unsigned char boolean;*/
typedef I_RPC_HANDLE RPC_BINDING_HANDLE;
typedef RPC_BINDING_HANDLE handle_t;
#define rpc_binding_handle_t RPC_BINDING_HANDLE
#ifndef GUID_DEFINED
#include <guiddef.h>
#endif /* GUID_DEFINED */
#ifndef UUID_DEFINED
#define UUID_DEFINED
typedef GUID UUID;
#ifndef uuid_t
#define uuid_t UUID
#endif
#endif
typedef struct _RPC_BINDING_VECTOR
{
unsigned long Count;
RPC_BINDING_HANDLE BindingH[1];
} RPC_BINDING_VECTOR;
#ifndef rpc_binding_vector_t
#define rpc_binding_vector_t RPC_BINDING_VECTOR
#endif
typedef struct _UUID_VECTOR
{
unsigned long Count;
UUID *Uuid[1];
} UUID_VECTOR;
#ifndef uuid_vector_t
#define uuid_vector_t UUID_VECTOR
#endif
typedef void __RPC_FAR * RPC_IF_HANDLE;
#ifndef IFID_DEFINED
#define IFID_DEFINED
typedef struct _RPC_IF_ID
{
UUID Uuid;
unsigned short VersMajor;
unsigned short VersMinor;
} RPC_IF_ID;
#endif
#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
// RPC_POLICY EndpointFlags.
#define RPC_C_BIND_TO_ALL_NICS 1
#define RPC_C_USE_INTERNET_PORT 0x1
#define RPC_C_USE_INTRANET_PORT 0x2
#define RPC_C_DONT_FAIL 0x4
// RPC_POLICY EndpointFlags specific to the Falcon/RPC transport:
#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
// Client: RpcBindingSetOption() values for the Falcon/RPC transport:
#define RPC_C_OPT_MQ_DELIVERY 1
#define RPC_C_OPT_MQ_PRIORITY 2
#define RPC_C_OPT_MQ_JOURNAL 3
#define RPC_C_OPT_MQ_ACKNOWLEDGE 4
#define RPC_C_OPT_MQ_AUTHN_SERVICE 5
#define RPC_C_OPT_MQ_AUTHN_LEVEL 6
#define RPC_C_OPT_MQ_TIME_TO_REACH_QUEUE 7
#define RPC_C_OPT_MQ_TIME_TO_BE_RECEIVED 8
#define RPC_C_OPT_BINDING_NONCAUSAL 9
#define RPC_C_OPT_SECURITY_CALLBACK 10
#define RPC_C_OPT_UNIQUE_BINDING 11
#define RPC_C_OPT_MAX_O
PTIONS 12
#define RPC_C_MQ_EXPRESS 0 // Client: RPC_C_MQ_DELIVERY.
#define RPC_C_MQ_RECOVERABLE 1
#define RPC_C_MQ_JOURNAL_NONE 0 // Client: RPC_C_MQ_JOURNAL.
#define RPC_C_MQ_JOURNAL_DEADLETTER 1
#define RPC_C_MQ_JOURNAL_ALWAYS 2
// flags for RpcServerInqAuthClientEx
//
#define RPC_C_FULL_CERT_CHAIN 0x0001
#ifdef RPC_UNICODE_SUPPORTED
typedef struct _RPC_PROTSEQ_VECTORA
{
unsigned int Count;
unsigned char __RPC_FAR * Protseq[1];
} RPC_PROTSEQ_VECTORA;
typedef struct _RPC_PROTSEQ_VECTORW
{
unsigned int Count;
unsigned short __RPC_FAR * Protseq[1];
} RPC_PROTSEQ_VECTORW;
#ifdef UNICODE
#define RPC_PROTSEQ_VECTOR RPC_PROTSEQ_VECTORW
#else /* UNICODE */
#define RPC_PROTSEQ_VECTOR RPC_PROTSEQ_VECTORA
#endif /* UNICODE */
#else /* RPC_UNICODE_SUPPORTED */
typedef struct _RPC_PROTSEQ_VECTOR
{
unsigned int Count;
unsigned char __RPC_FAR * Protseq[1];
} RPC_PROTSEQ_VECTOR;
#endif /* RPC_UNICODE_SUPPORTED */
typedef struct _RPC_POLICY {
unsigned int Length ;
unsigned long EndpointFlags ;
unsigned long NICFlags ;
} RPC_POLICY, __RPC_FAR *PRPC_POLICY ;
typedef void __RPC_USER
RPC_OBJECT_INQ_FN (
IN UUID __RPC_FAR * ObjectUuid,
OUT UUID __RPC_FAR * TypeUuid,
OUT RPC_STATUS __RPC_FAR * Status
);
typedef RPC_STATUS RPC_ENTRY
RPC_IF_CALLBACK_FN (
IN RPC_IF_HANDLE InterfaceUuid,
IN void *Context
) ;
typedef void RPC_ENTRY
RPC_SECURITY_CALLBACK_FN (
IN void *Context
) ;
#define RPC_MGR_EPV void
typedef struct
{
unsigned int Count;
unsigned long Stats[1];
} RPC_STATS_VECTOR;
#define RPC_C_STATS_CALLS_IN 0
#define RPC_C_STATS_CALLS_OUT 1
#define RPC_C_STATS_PKTS_IN 2
#define RPC_C_STATS_PKTS_OUT 3
typedef struct
{
unsigned long Count;
RPC_IF_ID __RPC_FAR * IfId[1];
} RPC_IF_ID_VECTOR;
/* client */
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcBindingCopy (
IN RPC_BINDING_HANDLE SourceBinding,
OUT RPC_BINDING_HANDLE __RPC_FAR * DestinationBinding
);
/* client */
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcBindingFree (
IN OUT RPC_BINDING_HANDLE __RPC_FAR * Binding
);
/* client */
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcBindingSetOption( IN RPC_BINDING_HANDLE hBinding,
IN unsigned long option,
IN ULONG_PTR optionValue );
/* client */
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcBindingInqOption( IN RPC_BINDING_HANDLE hBinding,
IN unsigned long option,
OUT ULONG_PTR *pOptionValue );
/* client */
#ifdef RPC_UNICODE_SUPPORTED
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcBindingFromStringBindingA (
IN unsigned char __RPC_FAR * StringBinding,
OUT RPC_BINDING_HANDLE __RPC_FAR * Binding
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcBindingFromStringBindingW (
IN unsigned short __RPC_FA
R * StringBinding,
OUT RPC_BINDING_HANDLE __RPC_FAR * Binding
);
#ifdef UNICODE
#define RpcBindingFromStringBinding RpcBindingFromStringBindingW
#else /* UNICODE */
#define RpcBindingFromStringBinding RpcBindingFromStringBindingA
#endif /* UNICODE */
#else /* RPC_UNICODE_SUPPORTED */
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcBindingFromStringBinding (
IN unsigned char __RPC_FAR * StringBinding,
OUT RPC_BINDING_HANDLE __RPC_FAR * Binding
);
#endif /* RPC_UNICODE_SUPPORTED */
/* client */
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcSsGetContextBinding (
IN void *ContextHandle,
OUT RPC_BINDING_HANDLE __RPC_FAR * Binding
);
/* client/server */
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcBindingInqObject (
IN RPC_BINDING_HANDLE Binding,
OUT UUID __RPC_FAR * ObjectUuid
)
;
/* client */
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcBindingReset (
IN RPC_BINDING_HANDLE Binding
);
/* RpcBindingServerFromClient : UNSUPPORTED */
/* RpcBindingSetAuthInfo */
/* client */
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcBindingSetObject (
IN RPC_BINDING_HANDLE Binding,
IN UUID __RPC_FAR * ObjectUuid
);
/* client/server */
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcMgmtInqDefaultProtectLevel(
IN unsigned long AuthnSvc,
OUT unsigned long __RPC_FAR *AuthnLevel
);
/* client/server */
#ifdef RPC_UNICODE_SUPPORTED
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcBindingToStringBindingA (
IN RPC_BINDING_HANDLE Binding,
OUT unsigned char __RPC_FAR * __RPC_FAR * StringBinding
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcBindingToStringBindingW (
IN RPC_BINDING_HANDLE Binding,
OUT unsigned short __RPC_FAR * __RPC_FAR * StringBinding
);
#ifdef UNICODE
#define RpcBindingToStringBinding RpcBindingToStringBindingW
#else /* UNICODE */
#define RpcBindingToStringBinding RpcBindingToStringBindingA
#endif /* UNICODE */
#else /* RPC_UNICODE_SUPPORTED */
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcBindingToStringBinding (
IN RPC_BINDING_HANDLE Binding,
OUT unsigned char __RPC_FAR * __RPC_FAR * StringBinding
);
#endif /* RPC_UNICODE_SUPPORTED */
/* client/server */
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcBindingVectorFree (
IN OUT RPC_BINDING_VECTOR __RPC_FAR * __RPC_FAR * BindingVector
);
/* client/server */
#ifdef RPC_UNICODE_SUPPORTED
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcStringBindingComposeA (
IN unsigned char __RPC_FAR * ObjUuid OPTIONAL,
IN unsigned char __RPC_FAR * Protseq OPTIONAL,
IN unsigned char __RPC_FAR * NetworkAddr OPTIONAL,
IN unsigned char __RPC_FAR * Endpoint OPTIONAL,
IN unsigned char __RPC_FAR * Options OPTIONAL,
OUT unsigned char __RPC_FAR * __RPC_FAR * StringBinding OPTIONAL
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcStringBindingComposeW (
IN unsigned short __RPC_FAR * ObjUuid OPTIONAL,
IN unsigned short __RPC_FAR * Protseq OPTIONAL,
IN unsigned short __RPC_FAR * Net
workAddr OPTIONAL,
IN unsigned short __RPC_FAR * Endpoint OPTIONAL,
IN unsigned short __RPC_FAR * Options OPTIONAL,
OUT unsigned short __RPC_FAR * __RPC_FAR * StringBinding OPTIONAL
);
#ifdef UNICODE
#define RpcStringBindingCompose RpcStringBindingComposeW
#else /* UNICODE */
#define RpcStringBindingCompose RpcStringBindingComposeA
#endif /* UNICODE */
#else /* RPC_UNICODE_SUPPORTED */
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcStringBindingCompose (
IN unsigned char __RPC_FAR * ObjUuid OPTIONAL,
IN unsigned char __RPC_FAR * Protseq OPTIONAL,
IN unsigned char __RPC_FAR * NetworkAddr OPTIONAL,
IN unsigned char __RPC_FAR * Endpoint OPTIONAL,
IN unsigned char __RPC_FAR * Options OPTIONAL,
OUT unsigned char __RPC_FAR * __RPC_FAR * StringBinding OPTIONAL
);
#endif /* RPC_UNICODE_SUPPORTED */
/* client/server */
#ifdef RPC_UNICODE_SUPPORTED
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcStringBindingParseA (
IN unsigned char __RPC_FAR * StringBinding,
OUT unsigned char __RPC_FAR * __RPC_FAR * ObjUuid OPTIONAL,
OUT unsigned char __RPC_FAR * __RPC_FAR * Protseq OPTIONAL,
OUT unsigned char __RPC_FAR * __RPC_FAR * NetworkAddr OPTIONAL,
OUT unsigned char __RPC_FAR * __RPC_FAR * Endpoint OPTIONAL,
OUT unsigned char __RPC_FAR * __RPC_FAR * NetworkOptions OPTIONAL
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcStringBindingParseW (
IN unsigned short __RPC_FAR * StringBinding,
OUT unsigned short __RPC_FAR * __RPC_FAR * ObjUuid OPTIONAL,
OUT unsigned short __RPC_FAR * __RPC_FAR * Protseq OPTIONAL,
OUT unsigned short __RPC_FAR * __RPC_FAR * NetworkAddr OPTIONAL,
OUT unsigned short __RPC_FAR * __RPC_FAR * Endpoint OPTIONAL,
OUT unsigned short __RPC_FAR * __RPC_FAR * NetworkOptions OPTIONAL
);
#ifdef UNICODE
#define RpcStringBindingParse RpcStringBindingParseW
#else /* UNICODE */
#define RpcStringBindingParse RpcStringBindingParseA
#endif /* UNICODE */
#else /* RPC_UNICODE_SUPPORTED */
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcStringBindingParse (
IN unsigned char __RPC_FAR * StringBinding,
OUT unsigned char __RPC_FAR * __RPC_FAR * ObjUuid OPTIONAL,
OUT unsigned char __RPC_FAR * __RPC_FAR * Protseq OPTIONAL,
setoption
OUT unsigned char __RPC_FAR * __RPC_FAR * NetworkAddr OPTIONAL,
OUT unsigned char __RPC_FAR * __RPC_FAR * Endpoint OPTIONAL,
OUT unsigned char __RPC_FAR * __RPC_FAR * NetworkOptions OPTIONAL
);
#endif /* RPC_UNICODE_SUPPORTED */
/* client/server */
#ifdef RPC_UNICODE_SUPPORTED
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcStringFreeA (
IN OUT unsigned char __RPC_FAR * __RPC_FAR * String
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcStringFreeW (
IN OUT unsigned short __RPC_FAR * __RPC_FAR * String
);
#ifdef UNICODE
#define RpcStringFree RpcStringFreeW
#else /* UNICODE */
#define RpcStringFree RpcStringFreeA
#endif /* UNICODE */
#else /* RPC_UNICODE_SUPPORTED */
RPC
RTAPI
RPC_STATUS
RPC_ENTRY
RpcStringFree (
IN OUT unsigned char __RPC_FAR * __RPC_FAR * String
);
#endif /* RPC_UNICODE_SUPPORTED */
/
* client/server */
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcIfInqId (
IN RPC_IF_HANDLE RpcIfHandle,
OUT RPC_IF_ID __RPC_FAR * RpcIfId
);
/* client/server */
#ifdef RPC_UNICODE_SUPPORTED
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcNetworkIsProtseqValidA (
IN unsigned char __RPC_FAR * Protseq
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcNetworkIsProtseqValidW (
IN unsigned short __RPC_FAR * Protseq
);
#ifdef UNICODE
#define RpcNetworkIsProtseqValid RpcNetworkIsProtseqValidW
#else /* UNICODE */
#define RpcNetworkIsProtseqValid RpcNetworkIsProtseqValidA
#endif /* UNICODE */
#else /* RPC_UNICODE_SUPPORTED */
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcNetworkIsProtseqValid (
IN unsigned char __RPC_FAR * Protseq
)
;
#endif /* RPC_UNICODE_SUPPORTED */
/* client */
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcMgmtInqComTimeout (
IN RPC_BINDING_HANDLE Binding,
OUT unsigned int __RPC_FAR * Timeout
);
/* client */
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcMgmtSetComTimeout (
IN RPC_BINDING_HANDLE Binding,
IN unsigned int Timeout
);
/* client */
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcMgmtSetCancelTimeout(
long Timeout
);
/* server */
#ifdef RPC_UNICODE_SUPPORTED
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcNetworkInqProtseqsA (
OUT RPC_PROTSEQ_VECTORA __RPC_FAR * __RPC_FAR * ProtseqVector
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcNetworkInqProtseqsW (
OUT RPC_PROTSEQ_VECTORW __RPC_FAR * __RPC_FAR * ProtseqVector
);
#ifdef UNICODE
#define RpcNetworkInqProtseqs RpcNetworkInqProtseqsW
#else /* UNICODE */
#define RpcNetworkInqProtseqs RpcNetworkInqProtseqsA
#endif /* UNICODE */
#else /* RPC_UNICODE_SUPPORTED */
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcNetworkInqProtseqs (
OUT RPC_PROTSEQ_VECTOR __RPC_FAR * __RPC_FAR * ProtseqVector
);
#endif /* RPC_UNICODE_SUPPORTED */
/* server */
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcObjectInqType (
IN UUID __RPC_FAR * ObjUuid,
OUT UUID __RPC_FAR * TypeUuid OPTIONAL
);
/* server */
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcObjectSetInqFn (
IN RPC_OBJECT_INQ_FN __RPC_FAR * InquiryFn
)
;
/* server */
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcObjectSetType (
IN UUID __RPC_FAR * ObjUuid,
IN UUID __RPC_FAR * TypeUuid OPTIONAL
);
/* server */
#ifdef RPC_UNICODE_SUPPORTED
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcProtseqVectorFreeA (
IN OUT RPC_PROTSEQ_VECTORA __RPC_FAR * __RPC_FAR * ProtseqVector
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcProtseqVectorFreeW (
IN OUT RPC_PROTSEQ_VECTORW __RPC_FAR * __RPC_FAR * ProtseqVector
)
;
#ifdef UNICODE
#define RpcProtseqVectorFree RpcProtseqVectorFreeW
#else /* UNICODE */
#define RpcProtseqVectorFree RpcProtseqVectorFreeA
#endif /* UNICODE */
#else /* RPC_
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论