00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef DCEPORT_H
00017 #define DCEPORT_H
00018
00019 #ifdef __cplusplus
00020 extern "C" {
00021 #endif
00022
00023
00024
00025
00026 #define idl_char unsigned char
00027 #define idl_boolean unsigned char
00028 #define idl_byte unsigned char
00029 #define idl_small_int char
00030 #define idl_usmall_int unsigned char
00031 #define idl_short_int signed short
00032 #define idl_ushort_int unsigned short
00033 #define idl_long_int long
00034 #define idl_ulong_int unsigned long
00035 #define boolean32 unsigned long
00036 #define unsigned32 unsigned long
00037 #define unsigned16 unsigned short
00038 #define idl_true 1
00039 #define idl_false 0
00040 #define unsigned_char_t unsigned char
00041 typedef unsigned char __RPC_FAR *unsigned_char_p_t;
00042 typedef void __RPC_FAR *idl_void_p_t;
00043
00044 #ifndef _ERROR_STATUS_T_DEFINED
00045 typedef unsigned long error_status_t;
00046 #define _ERROR_STATUS_T_DEFINED
00047 #endif
00048
00049
00050
00051
00052 #define rpc_if_handle_t RPC_IF_HANDLE
00053 #define rpc_ns_handle_t RPC_NS_HANDLE
00054 #define rpc_authz_handle_t RPC_AUTHZ_HANDLE
00055 #define rpc_auth_identity_handle_t RPC_AUTH_IDENTITY_HANDLE
00056 #define rpc_sm_thread_handle_t RPC_SS_THREAD_HANDLE
00057 #define rpc_mgr_epv_t RPC_MGR_EPV __RPC_FAR *
00058 #define rpc_object_inq_fn_t RPC_OBJECT_INQ_FN __RPC_FAR *
00059 #define rpc_auth_key_retrieval_fn_t RPC_AUTH_KEY_RETRIEVAL_FN
00060 #define rpc_mgmt_authorization_fn_t RPC_MGMT_AUTHORIZATION_FN
00061
00062
00063
00064
00065 #ifdef rpc_binding_vector_t
00066 #undef rpc_binding_vector_t
00067 #endif
00068
00069 typedef struct
00070 {
00071 unsigned long count;
00072 handle_t binding_h[1];
00073 } rpc_binding_vector_t, __RPC_FAR *rpc_binding_vector_p_t;
00074
00075
00076
00077
00078
00079 typedef struct
00080 {
00081 unsigned long count;
00082 unsigned char * protseq[1];
00083 } rpc_protseq_vector_t, __RPC_FAR *rpc_protseq_vector_p_t;
00084
00085
00086
00087
00088
00089 typedef struct
00090 {
00091 unsigned long count;
00092 unsigned long stats[1];
00093 } rpc_stats_vector_t, __RPC_FAR *rpc_stats_vector_p_t;
00094
00095
00096
00097
00098 #ifdef uuid_t
00099 #undef uuid_t
00100 #endif
00101
00102 typedef struct
00103 {
00104 unsigned long time_low;
00105 unsigned short time_mid;
00106 unsigned short time_hi_and_version;
00107 unsigned char clock_seq_hi_and_reserved;
00108 unsigned char clock_seq_low;
00109 unsigned char node[6];
00110 } uuid_t, __RPC_FAR *uuid_p_t;
00111
00112
00113
00114
00115 #ifdef uuid_vector_t
00116 #undef uuid_vector_t
00117 #endif
00118
00119 typedef struct
00120 {
00121 unsigned long count;
00122 uuid_p_t uuid[1];
00123 } uuid_vector_t, __RPC_FAR *uuid_vector_p_t;
00124
00125
00126
00127
00128
00129 typedef struct
00130 {
00131 uuid_t uuid;
00132 unsigned short vers_major;
00133 unsigned short vers_minor;
00134 } rpc_if_id_t, __RPC_FAR *rpc_if_id_p_t;
00135
00136
00137
00138
00139
00140 typedef struct
00141 {
00142 unsigned long count;
00143 rpc_if_id_p_t if_id[1];
00144 } rpc_if_id_vector_t, __RPC_FAR *rpc_if_id_vector_p_t;
00145
00146
00147
00148
00149
00150
00151
00152 #define rpc_c_listen_min_threads_default 1
00153
00154
00155
00156
00157 #define rpc_c_ns_syntax_default RPC_C_NS_SYNTAX_DEFAULT
00158 #define rpc_c_ns_syntax_dce RPC_C_SYNTAX_DCE
00159 #define rpc_c_ns_default_exp_age RPC_C_DEFAULT_EXP_AGE
00160 #define rpc_c_protseq_max_reqs_default RPC_C_PROTSEQ_MAX_REQS_DEFAULT
00161 #define rpc_c_protseq_max_calls_default RPC_C_PROTSEQ_MAX_REQS_DEFAULT
00162 #define rpc_c_listen_max_calls_default RPC_C_LISTEN_MAX_CALLS_DEFAULT
00163 #define rpc_c_ep_all_elts RPC_C_EP_ALL_ELTS
00164 #define rpc_c_ep_match_by_if RPC_C_EP_MATCH_BY_IF
00165 #define rpc_c_ep_match_by_obj RPC_C_EP_MATCH_BY_OBJ
00166 #define rpc_c_ep_match_by_both RPC_C_EP_MATCH_BY_BOTH
00167 #define rpc_c_vers_all RPC_C_VERS_ALL
00168 #define rpc_c_vers_compatible RPC_C_VERS_COMPATIBLE
00169 #define rpc_c_vers_exact RPC_C_VERS_EXACT
00170 #define rpc_c_vers_major_only RPC_C_VERS_MAJOR_ONLY
00171 #define rpc_c_vers_upto RPC_C_VERS_UPTO
00172 #define rpc_c_profile_default_elt RPC_C_PROFILE_DEFAULT_ELT
00173 #define rpc_c_profile_all_elts RPC_C_PROFILE_ALL_ELTS
00174 #define rpc_c_profile_match_by_if RPC_C_PROFILE_MATCH_BY_IF
00175 #define rpc_c_profile_match_by_mbr RPC_C_PROFILE_MATCH_BY_MBR
00176 #define rpc_c_profile_match_by_both RPC_C_PROFILE_MATCH_BY_BOTH
00177 #define rpc_c_binding_min_timeout RPC_C_BINDING_MIN_TIMEOUT
00178 #define rpc_c_binding_default_timeout RPC_C_BINDING_DEFAULT_TIMEOUT
00179 #define rpc_c_binding_max_timeout RPC_C_BINDING_MAX_TIMEOUT
00180 #define rpc_c_binding_infinite_timeout RPC_C_BINDING_INFINITE_TIMEOUT
00181 #define rpc_c_stats_calls_in RPC_C_STATS_CALLS_IN
00182 #define rpc_c_stats_calls_out RPC_C_STATS_CALLS_OUT
00183 #define rpc_c_stats_pkts_in RPC_C_STATS_PKTS_IN
00184 #define rpc_c_stats_pkts_out RPC_C_STATS_PKTS_OUT
00185 #define rpc_c_mgmt_inq_if_ids RPC_C_MGMT_INQ_IF_IDS
00186 #define rpc_c_mgmt_inq_princ_name RPC_C_MGMT_INQ_PRINC_NAME
00187 #define rpc_c_mgmt_inq_stats RPC_C_MGMT_INQ_STATS
00188 #define rpc_c_mgmt_inq_server_listen RPC_C_MGMT_INQ_SERVER_LISTEN
00189 #define rpc_c_mgmt_stop_server_listen RPC_C_MGMT_STOP_SERVER_LISTEN
00190 #define rpc_c_mgmt_cancel_infinite_timeout RPC_C_CANCEL_INFINITE_TIMEOUT
00191
00192
00193
00194
00195 #define rpc_binding_copy(source,dest,status) \
00196 *(status) = RpcBindingCopy(source,dest)
00197
00198 #define rpc_binding_free(binding,status) *(status) = RpcBindingFree(binding)
00199
00200 #define rpc_binding_from_string_binding(string_binding,binding,status) \
00201 *(status) = RpcBindingFromStringBinding(string_binding,binding)
00202
00203 #define rpc_binding_inq_auth_client(binding,privs,princ_name,protect_level, \
00204 authn_svc,authz_svc,status) \
00205 *(status) = RpcBindingInqAuthClient(binding,privs,princ_name, \
00206 protect_level,authn_svc,authz_svc)
00207
00208 #define rpc_binding_inq_auth_info(binding,princ_name,protect_level,\
00209 authn_svc,auth_identity,authz_svc,status) \
00210 *(status) = RpcBindingInqAuthInfo(binding,princ_name, \
00211 protect_level,authn_svc,auth_identity,authz_svc)
00212
00213 #define rpc_binding_inq_object(binding,object_uuid,status) \
00214 *(status) = RpcBindingInqObject(binding,\
00215 (UUID __RPC_FAR *)object_uuid)
00216
00217 #define rpc_binding_reset(binding,status) *(status) = RpcBindingReset(binding)
00218
00219 #define rpc_binding_server_from_client(cbinding,sbinding,status) \
00220 *(status) = RpcBindingServerFromClient(cbinding,sbinding)
00221
00222 #define rpc_binding_set_auth_info(binding,princ_name,protect_level,\
00223 authn_svc,auth_identity,authz_svc,status) \
00224 *(status) = RpcBindingSetAuthInfo(binding,princ_name,\
00225 protect_level,authn_svc,auth_identity,authz_svc)
00226
00227 #define rpc_binding_set_object(binding,object_uuid,status) \
00228 *(status) = RpcBindingSetObject(binding,\
00229 (UUID __RPC_FAR *)object_uuid)
00230
00231 #define rpc_binding_to_string_binding(binding,string_binding,status) \
00232 *(status) = RpcBindingToStringBinding(binding,string_binding)
00233
00234 #define rpc_binding_vector_free(binding_vector,status) \
00235 *(status) = RpcBindingVectorFree(\
00236 (RPC_BINDING_VECTOR __RPC_FAR * __RPC_FAR *)binding_vector)
00237
00238 #define rpc_ep_register(if_spec,binding_vec,object_uuid_vec,annotation,\
00239 status)\
00240 *(status) = RpcEpRegister(if_spec,\
00241 (RPC_BINDING_VECTOR __RPC_FAR *)binding_vec, \
00242 (UUID_VECTOR __RPC_FAR *)object_uuid_vec, annotation)
00243
00244 #define rpc_ep_register_no_replace(if_spec,binding_vec,object_uuid_vec,\
00245 annotation,status) \
00246 *(status) = RpcEpRegisterNoReplace(if_spec,\
00247 (RPC_BINDING_VECTOR __RPC_FAR *)binding_vec,\
00248 (UUID_VECTOR __RPC_FAR *)object_uuid_vec,annotation)
00249
00250 #define rpc_ep_resolve_binding(binding_h,if_spec,status) \
00251 *(status) = RpcEpResolveBinding(binding_h,if_spec)
00252
00253 #define rpc_ep_unregister(if_spec,binding_vec,object_uuid_vec,status) \
00254 *(status) = RpcEpUnregister(if_spec,\
00255 (RPC_BINDING_VECTOR __RPC_FAR *)binding_vec,\
00256 (UUID_VECTOR __RPC_FAR *)object_uuid_vec)
00257
00258 #define rpc_if_id_vector_free(if_id_vector,status) \
00259 *(status) = RpcIfIdVectorFree(\
00260 (RPC_IF_ID_VECTOR __RPC_FAR * __RPC_FAR *)if_id_vector)
00261
00262 #define rpc_if_inq_id(if_spec,if_id,status) \
00263 *(status) = RpcIfInqId(if_spec,(RPC_IF_ID __RPC_FAR *)if_id)
00264
00265 #define rpc_if_register_auth_info(if_spec,princ_name,protect_level,\
00266 authn_svc,auth_identity,authz_svc,status) \
00267 *(status) = RpcIfRegisterAuthInfo(if_spec,princ_name,\
00268 protect_level,authn_svc,auth_identity,authz_svc)
00269
00270 #define rpc_mgmt_ep_elt_inq_begin(ep_binding,inquiry_type,if_id,vers_option,\
00271 object_uuid,inquiry_context,status) \
00272 *(status) = RpcMgmtEpEltInqBegin(ep_binding,inquiry_type,if_id,\
00273 vers_option,object_uuid,inquiry_context)
00274
00275 #define rpc_mgmt_ep_elt_inq_done(inquiry_context,status) \
00276 *(status) = RpcMgmtEpEltInqDone(inquiry_context)
00277
00278 #define rpc_mgmt_ep_elt_inq_next(inquiry_context,if_id,binding,object_uuid,\
00279 annotation,status) \
00280 *(status) = RpcMgmtEpEltInqNext(inquiry_context,if_id,binding,\
00281 object_uuid,annotation)
00282
00283 #define rpc_mgmt_ep_unregister(ep_binding,if_id,binding,object_uuid,status) \
00284 *(status) = RpcMgmtEpUnregister(ep_binding,if_id,binding,\
00285 object_uuid)
00286
00287 #define rpc_mgmt_inq_com_timeout(binding,timeout,status) \
00288 *(status) = RpcMgmtInqComTimeout(binding,timeout)
00289
00290 #define rpc_mgmt_inq_dflt_protect_level(authn_svc,level,status) \
00291 *(status) = RpcMgmtInqDefaultProtectLevel(authn_svc,level)
00292
00293 #define rpc_mgmt_inq_if_ids(binding,if_id_vector,status) \
00294 *(status) = RpcMgmtInqIfIds((bindings),\
00295 (RPC_IF_ID_VECTOR __RPC_FAR * __RPC_FAR *)(if_id_vector))
00296
00297 #define rpc_mgmt_inq_server_princ_name(binding,authn_svc,princ_name,status) \
00298 *(status) = RpcMgmtInqServerPrincName(binding,authn_svc,\
00299 princ_name)
00300
00301 #define rpc_mgmt_inq_stats(binding,statistics,status) \
00302 *(status) = RpcMgmtInqStats(binding,\
00303 (RPC_STATS_VECTOR __RPC_FAR * __RPC_FAR *)statistics)
00304
00305 #define rpc_mgmt_is_server_listening(binding,status) \
00306 ( ((*(status) = RpcMgmtIsServerListening(binding)) == RPC_S_OK) \
00307 ? (1) : (*(status) == RPC_S_NOT_LISTENING) \
00308 ? (*(status) = RPS_S_OK, 0) : (0) )
00309
00310 #define rpc_mgmt_set_authorization_fn(authz_fn,status) \
00311 *(status) = RpcMgmtSetAuthorizathionFn(authz_fn)
00312
00313 #define rpc_mgmt_set_cancel_timeout(seconds,status) \
00314 *(status) = RpcMgmtSetCancelTimeout(seconds)
00315
00316 #define rpc_mgmt_set_com_timeout(binding,timeout,status) \
00317 *(status) = RpcMgmtSetComTimeout(binding,timeout)
00318
00319 #define rpc_mgmt_set_server_stack_size(size,status) \
00320 *(status) = RpcMgmtSetServerStackSize(size)
00321
00322 #define rpc_mgmt_stats_vector_free(stats,status) \
00323 *(status) = RpcMgmtStatsVectorFree(\
00324 (RPC_STATS_VECTOR __RPC_FAR * __RPC_FAR *)stats)
00325
00326 #define rpc_mgmt_stop_server_listening(binding,status) \
00327 *(status) = RpcMgmtStopServerListening(binding)
00328
00329 #define rpc_network_inq_protseqs(prots,status) \
00330 *(status) = RpcNetworkInqProtseqs(\
00331 (RPC_PROTSEQ_VECTOR __RPC_FAR * __RPC_FAR *)prots)
00332
00333 #define rpc_network_is_protseq_valid(protseq,status) \
00334 *(status) = RpcNetworkIsProtseqValid(protseq)
00335
00336
00337
00338
00339 #define rpc_ns_binding_export(name_syntax,entry_name,if_spec,\
00340 binding_vector, uuid_vector,status) \
00341 *(status) = RpcNsBindingExport(name_syntax,entry_name,\
00342 if_spec, (RPC_BINDING_VECTOR *)binding_vector,\
00343 (UUID_VECTOR __RPC_FAR *)uuid_vector)
00344
00345 #define rpc_ns_binding_import_begin(name_syntax,entry_name,if_spec,\
00346 object_uuid,import_context,status) \
00347 *(status) = RpcNsBindingImportBegin(name_syntax,entry_name,\
00348 if_spec,(UUID __RPC_FAR *)object_uuid,import_context)
00349
00350 #define rpc_ns_binding_import_done(import_context,status) \
00351 *(status) = RpcNsBindingImportDone(import_context)
00352
00353 #define rpc_ns_binding_import_next(import_context,binding,status) \
00354 *(status) = RpcNsBindingImportNext(import_context,binding)
00355
00356 #define rpc_ns_binding_inq_entry_name(binding,name_syntax,entry_name,status)\
00357 *(status) = RpcNsBindingInqEntryName(binding,name_syntax,\
00358 entry_name)
00359
00360 #define rpc_ns_binding_lookup_begin(name_syntax,entry_name,if_spec,\
00361 object_uuid,max_count,lookup_context,status) \
00362 *(status) = RpcNsBindingLookupBegin(name_syntax,entry_name,\
00363 if_spec,(UUID __RPC_FAR *)object_uuid,max_count,lookup_context)
00364
00365 #define rpc_ns_binding_lookup_done(lookup_context,status) \
00366 *(status) = RpcNsBindingLookupDone(lookup_context)
00367
00368 #define rpc_ns_binding_lookup_next(lookup_context,binding_vector,status) \
00369 *(status) = RpcNsBindingLookupNext(lookup_context, \
00370 (RPC_BINDING_VECTOR __RPC_FAR * __RPC_FAR *)binding_vector)
00371
00372 #define rpc_ns_binding_select(binding_vector,binding,status) \
00373 *(status) = RpcNsBindingSelect(\
00374 (RPC_BINDING_VECTOR __RPC_FAR *)binding_vector,binding)
00375
00376 #define rpc_ns_binding_unexport(name_syntax,entry_name,if_spec,\
00377 uuid_vector,status) \
00378 *(status) = RpcNsBindingUnexport(name_syntax,entry_name,\
00379 if_spec, (UUID_VECTOR __RPC_FAR *)uuid_vector)
00380
00381 #define rpc_ns_entry_expand_name(name_syntax,entry_name,expanded_name,\
00382 status)\
00383 *(status) = RpcNsEntryExpandName(name_syntax,entry_name,\
00384 expanded_name)
00385
00386 #define rpc_ns_entry_object_inq_begin(name_syntax,entry_name,\
00387 inquiry_context,status)\
00388 *(status) = RpcNsEntryObjectInqBegin(name_syntax,\
00389 entry_name,inquiry_context)
00390
00391 #define rpc_ns_entry_object_inq_done(inquiry_context,status) \
00392 *(status) = RpcNsEntryObjectInqDone(inquiry_context)
00393
00394 #define rpc_ns_entry_object_inq_next(inquiry_context,object_uuid,status) \
00395 *(status) = RpcNsEntryObjectInqNext(inquiry_context,\
00396 (UUID __RPC_FAR *)object_uuid)
00397
00398 #define rpc_ns_group_delete(name_syntax,group_name,status) \
00399 *(status) = RpcNsGroupDelete(name_syntax,group_name)
00400
00401 #define rpc_ns_group_mbr_add(name_syntax,group_name,member_name_syntax,\
00402 member_name,status) \
00403 *(status) = RpcNsGroupMbrAdd(name_syntax,group_name,\
00404 member_name_syntax,member_name)
00405
00406 #define rpc_ns_group_mbr_inq_begin(name_syntax,group_name,member_name_syntax,\
00407 inquiry_context,status) \
00408 *(status) = RpcNsGroupMbrInqBegin(name_syntax,group_name,\
00409 member_name_syntax,inquiry_context)
00410
00411 #define rpc_ns_group_mbr_inq_done(inquiry_context,status) \
00412 *(status) = RpcNsGroupMbrInqDone(inquiry_context)
00413
00414 #define rpc_ns_group_mbr_inq_next(inquiry_context,member_name,status) \
00415 *(status) = RpcNsGroupMbrInqNext(inquiry_context,member_name)
00416
00417 #define rpc_ns_group_mbr_remove(name_syntax,group_name,member_name_syntax,\
00418 member_name,status) \
00419 *(status) = RpcNsGroupMbrRemove(name_syntax,group_name,\
00420 member_name_syntax,member_name)
00421
00422 #define rpc_ns_mgmt_binding_unexport(name_syntax,entry_name,if_id,vers_option,\
00423 uuid_vector,status) \
00424 *(status) = RpcNsMgmtBindingUnexport(name_syntax,entry_name,\
00425 (RPC_IF_ID __RPC_FAR *)if_id,vers_option,\
00426 (UUID_VECTOR __RPC_FAR *)uuid_vector)
00427
00428 #define rpc_ns_mgmt_entry_create(name_syntax,entry_name,status) \
00429 *(status) = RpcNsMgmtEntryCreate(name_syntax,entry_name)
00430
00431 #define rpc_ns_mgmt_entry_delete(name_syntax,entry_name,status) \
00432 *(status) = RpcNsMgmtEntryDelete(name_syntax,entry_name)
00433
00434 #define rpc_ns_mgmt_entry_inq_if_ids(name_syntax,entry_name,if_id_vector,\
00435 status) \
00436 *(status) = RpcNsMgmtEntryInqIfIds(name_syntax,entry_name,\
00437 (RPC_IF_ID_VECTOR __RPC_FAR * __RPC_FAR *)if_id_vector)
00438
00439 #define rpc_ns_mgmt_handle_set_exp_age(ns_handle,expiration_age,status) \
00440 *(status) = RpcNsMgmtHandleSetExpAge(ns_handle,expiration_age)
00441
00442 #define rpc_ns_mgmt_inq_exp_age(expiration_age,status) \
00443 *(status) = RpcNsMgmtInqExpAge(expiration_age)
00444
00445 #define rpc_ns_mgmt_set_exp_age(expiration_age,status) \
00446 *(status) = RpcNsMgmtSetExpAge(expiration_age)
00447
00448 #define rpc_ns_profile_delete(name_syntax,profile_name,status) \
00449 *(status) = RpcNsProfileDelete(name_syntax,profile_name)
00450
00451 #define rpc_ns_profile_elt_add(name_syntax,profile_name,if_id,\
00452 member_name_syntax,member_name,priority,annotation,status) \
00453 *(status) = RpcNsProfileEltAdd(name_syntax,profile_name,\
00454 (RPC_IF_ID __RPC_FAR *)if_id,member_name_syntax,member_name,\
00455 priority,annotation)
00456
00457 #define rpc_ns_profile_elt_inq_begin(name_syntax,profile_name,inquiry_type,\
00458 if_id,if_vers_option,member_name_syntax,\
00459 member_name,inquiry_context,status) \
00460 *(status) = RpcNsProfileEltInqBegin(name_syntax,profile_name,\
00461 inquiry_type,(RPC_IF_ID __RPC_FAR *)if_id,if_vers_option,\
00462 member_name_syntax,member_name,inquiry_context)
00463
00464 #define rpc_ns_profile_elt_inq_done(inquiry_context,status) \
00465 *(status) = RpcNsProfileEltInqDone(inquiry_context)
00466
00467 #define rpc_ns_profile_elt_inq_next(inquiry_context,if_id,member_name,\
00468 priority,annotation,status) \
00469 *(status) = RpcNsProfileEltInqNext(inquiry_context,\
00470 (RPC_IF_ID __RPC_FAR *)if_id,member_name,priority,annotation)
00471
00472 #define rpc_ns_profile_elt_remove(name_syntax,profile_name,if_id,\
00473 member_name_syntax,member_name,status) \
00474 *(status) = RpcNsProfileEltRemove(name_syntax,profile_name,\
00475 (RPC_IF_ID __RPC_FAR *)if_id,member_name_syntax,member_name)
00476
00477 #define rpc_object_inq_type(object_uuid,type_uuid,status) \
00478 *(status) = RpcObjectInqType((UUID __RPC_FAR *)object_uuid,\
00479 (UUID __RPC_FAR *)type_uuid)
00480
00481 #define rpc_object_set_inq_fn(inq_fn,status) \
00482 *(status) = RpcObjectSetInqFn(inq_fn)
00483
00484 #define rpc_object_set_type(object_uuid,type_uuid,status) \
00485 *(status) = RpcObjectSetType((UUID __RPC_FAR *)object_uuid,\
00486 (UUID __RPC_FAR *)type_uuid)
00487
00488 #define rpc_protseq_vector_free(protseq_vector,status) \
00489 *(status) = RpcProtseqVectorFree( \
00490 (RPC_PROTSEQ_VECTOR __RPC_FAR * __RPC_FAR *)protseq_vector)
00491
00492 #define rpc_server_inq_bindings(binding_vector,status) \
00493 *(status) = RpcServerInqBindings(\
00494 (RPC_BINDING_VECTOR __RPC_FAR * __RPC_FAR *)binding_vector)
00495
00496 #define rpc_server_inq_if(if_spec,type_uuid,mgr_epv,status) \
00497 *(status) = RpcServerInqIf(if_spec,(UUID __RPC_FAR *)type_uuid,\
00498 (RPC_MGR_EPV __RPC_FAR *)mgr_epv)
00499
00500 #define rpc_server_listen(max_calls,status) \
00501 *(status) = RpcServerListen(rpc_c_listen_min_threads_default,\
00502 max_calls, 1)
00503
00504 #define rpc_server_register_auth_info(princ_name,auth_svc,get_key_func,arg,\
00505 status) \
00506 *(status) = RpcServerRegisterAuthInfo(princ_name,auth_svc,\
00507 get_key_func,arg)
00508
00509 #define rpc_server_register_if(if_spec,type_uuid,mgr_epv,status) \
00510 *(status) = RpcServerRegisterIf(if_spec,\
00511 (UUID __RPC_FAR *)type_uuid,(RPC_MGR_EPV __RPC_FAR *)mgr_epv)
00512
00513 #define rpc_server_unregister_if(if_spec,type_uuid,status) \
00514 *(status) = RpcServerUnregisterIf(if_spec,(UUID *)type_uuid,0)
00515
00516 #define rpc_server_use_all_protseqs(max_call_requests,status) \
00517 *(status) = RpcServerUseAllProtseqs(max_call_requests,0)
00518
00519 #define rpc_server_use_all_protseqs_if(max_call_requests,if_spec,status) \
00520 *(status) = RpcServerUseAllProtseqsIf(max_call_requests,\
00521 if_spec,0)
00522
00523 #define rpc_server_use_protseq(protseq,max_call_requests,status) \
00524 *(status) = RpcServerUseProtseq(protseq,max_call_requests,0)
00525
00526 #define rpc_server_use_protseq_ep(protseq,max_call_requests,endpoint,status)\
00527 *(status) = RpcServerUseProtseqEp(protseq,max_call_requests,\
00528 endpoint,0)
00529
00530 #define rpc_server_use_protseq_if(protseq,max_call_requests,if_spec,status) \
00531 *(status) = RpcServerUseProtseqIf(protseq,max_call_requests,\
00532 if_spec,0)
00533
00534 #define rpc_sm_alloce(size,status) *(status) = RpcSmAllocate(size)
00535
00536 #define rpc_sm_client_free(ptr,status) *(status) = RpcSmClientFree(ptr)
00537
00538 #define rpc_sm_destroy_client_context(context,status) \
00539 *(status) = RpcSmDestroyClientContext(context)
00540
00541 #define rpc_sm_disable_allocate(status) *(status) = RpcSmDisableAllocate()
00542
00543 #define rpc_sm_enable_allocate(status) *(status) = RpcSmEnableAllocate()
00544
00545 #define rpc_sm_free(ptr,status) *(status) = RpcSmFree(ptr)
00546
00547 #define rpc_sm_get_thread_handle(status) RpcSmGetThreadHandle(status)
00548
00549 #define rpc_sm_set_client_alloc_free(alloc,free,status) \
00550 *(status) = RpcSmSetClientAllocFree(alloc,free)
00551
00552 #define rpc_sm_set_thread_handle(id,status) \
00553 *(status) = RpcSmSetThreadHandle(id)
00554
00555 #define rpc_sm_swap_client_alloc_free(alloc,free,old_alloc,old_free,status) \
00556 *(status) = RpcSmSwapClientAllocFree(alloc,free \
00557 old_alloc, old_free)
00558
00559 #define rpc_string_binding_compose(object_uuid,protseq,netaddr,endpoint,\
00560 options,binding,status) \
00561 *(status) = RpcStringBindingCompose(object_uuid,protseq,\
00562 netaddr,endpoint,options,binding)
00563
00564 #define rpc_string_binding_parse(string_binding,object_uuid,protseq,netaddr,\
00565 endpoint,options,status) \
00566 *(status) = RpcStringBindingParse(string_binding,\
00567 object_uuid,protseq,netaddr,endpoint,options)
00568
00569 #define rpc_string_free(string,status) *(status) = RpcStringFree(string)
00570
00571 #define uuid_compare(uuid1,uuid2,status) \
00572 UuidCompare((UUID __RPC_FAR *)(uuid1),\
00573 (UUID __RPC_FAR *)(uuid2),(status))
00574
00575 #define uuid_create(uuid,status) \
00576 *(status) = UuidCreate((UUID __RPC_FAR *)uuid)
00577
00578 #define uuid_create_nil(uuid,status) \
00579 *(status) = UuidCreateNil((UUID __RPC_FAR *)uuid)
00580
00581 #define uuid_equal(uuid1,uuid2,status) \
00582 UuidEqual((UUID __RPC_FAR *)(uuid1), \
00583 (UUID __RPC_FAR *)(uuid2), (status))
00584
00585 #define uuid_from_string(string,uuid,status) \
00586 *(status) = UuidFromString(string,(UUID __RPC_FAR *)uuid)
00587
00588 #define uuid_hash(uuid,status) \
00589 UuidHash((UUID __RPC_FAR *)(uuid),(status))
00590
00591 #define uuid_is_nil(uuid,status) \
00592 UuidIsNil((UUID __RPC_FAR *)(uuid), (status))
00593
00594 #define uuid_to_string(uuid,string,status)\
00595 *(status) = UuidToString((UUID __RPC_FAR *)uuid,string)
00596
00597
00598 #define true 1
00599 #define false 0
00600
00601
00602
00603
00604
00605 #if defined (__RPC_WIN16__) || defined (__RPC_DOS__)
00606
00607 #define TRY \
00608 { \
00609 int _exception_mode_finally; \
00610 int _exception_code; \
00611 ExceptionBuff exception; \
00612 _exception_code = RpcSetException(&exception); \
00613 if (!_exception_code) \
00614 {
00615
00616 #define CATCH_ALL \
00617 _exception_mode_finally = false; \
00618 RpcLeaveException(); \
00619 } \
00620 else \
00621 {
00622
00623
00624
00625
00626 #define FINALLY \
00627 _exception_mode_finally = true; \
00628 RpcLeaveException(); \
00629 } {
00630 #define ENDTRY \
00631 } \
00632 if (_exception_mode_finally && _exception_code) \
00633 RpcRaiseException(_exception_code); \
00634 }
00635
00636 #endif
00637
00638
00639 #if defined (__RPC_WIN32__)
00640 #define TRY try {
00641
00642
00643
00644
00645
00646
00647 #define CATCH_ALL } except (EXCEPTION_EXECUTE_HANDLER) {
00648 #define FINALLY } finally {
00649 #define ENDTRY }
00650 #endif
00651
00652 #define RAISE(v) RpcRaiseException(v)
00653 #define RERAISE RpcRaiseException(RpcExceptionCode())
00654 #define THIS_CATCH RpcExceptionCode()
00655
00656
00657
00658
00659 #ifndef rpc_s_ok
00660 #define rpc_s_ok RPC_S_OK
00661 #endif
00662 #ifndef error_status_ok
00663 #define error_status_ok RPC_S_OK
00664 #endif
00665 #define ept_s_cant_perform_op EPT_S_CANT_PERFORM_OP
00666 #define ept_s_invalid_entry EPT_S_INVALID_ENTRY
00667 #define ept_s_not_registered EPT_S_NOT_REGISTERED
00668 #define rpc_s_already_listening RPC_S_ALREADY_LISTENING
00669 #define rpc_s_already_registered RPC_S_ALREADY_REGISTERED
00670 #define rpc_s_binding_has_no_auth RPC_S_BINDING_HAS_NO_AUTH
00671 #define rpc_s_binding_imcomplete RPC_S_BINDING_IMCOMPLETE
00672 #define rpc_s_call_cancelled RPC_S_CALL_CANCELLED
00673 #define rpc_s_call_failed RPC_S_CALL_FAILED
00674 #define rpc_s_cant_bind_socket RPC_S_CANNOT_BIND
00675 #define rpc_s_cant_create_socket RPC_S_CANT_CREATE_ENDPOINT
00676 #define rpc_s_comm_failure RPC_S_COMM_FAILURE
00677 #define rpc_s_connect_no_resources RPC_S_OUT_OF_RESOURCES
00678 #define rpc_s_cthread_create_failed RPC_S_OUT_OF_THREADS
00679 #define rpc_s_endpoint_not_found RPC_S_NO_ENDPOINT_FOUND
00680 #define rpc_s_entry_already_exists RPC_S_ENTRY_ALREADY_EXISTS
00681 #define rpc_s_entry_not_found RPC_S_ENTRY_NOT_FOUND
00682 #define rpc_s_fault_addr_error RPC_S_ADDRESS_ERROR
00683 #define rpc_s_fault_fp_div_by_zero RPC_S_FP_DIV_ZERO
00684 #define rpc_s_fault_fp_overflow RPC_S_FP_OVERFLOW
00685 #define rpc_s_fault_fp_underflow RPC_S_FP_UNDERFLOW
00686 #define rpc_s_fault_int_div_by_zero RPC_S_ZERO_DIVIDE
00687 #define rpc_s_fault_invalid_bound RPC_S_INVALID_BOUND
00688 #define rpc_s_fault_invalid_tag RPC_S_INVALID_TAG
00689 #define rpc_s_fault_remote_no_memory RPC_S_SERVER_OUT_OF_MEMORY
00690 #define rpc_s_fault_unspec RPC_S_CALL_FAILED
00691 #define rpc_s_incomplete_name RPC_S_INCOMPLETE_NAME
00692 #define rpc_s_interface_not_found RPC_S_INTERFACE_NOT_FOUND
00693 #define rpc_s_internal_error RPC_S_INTERNAL_ERROR
00694 #define rpc_s_inval_net_addr RPC_S_INVALID_NET_ADDR
00695 #define rpc_s_invalid_arg RPC_S_INVALID_ARG
00696 #define rpc_s_invalid_binding RPC_S_INVALID_BINDING
00697 #define rpc_s_invalid_endpoint_format RPC_S_INVALID_ENDPOINT_FORMAT
00698 #define rpc_s_invalid_naf_id RPC_S_INVALID_NAF_IF
00699 #define rpc_s_invalid_name_syntax RPC_S_INVALID_NAME_SYNTAX
00700 #define rpc_s_invalid_rpc_protseq RPC_S_INVALID_RPC_PROTSEQ
00701 #define rpc_s_invalid_string_binding RPC_S_INVALID_STRING_BINDING
00702 #define rpc_s_invalid_timeout RPC_S_INVALID_TIMEOUT
00703 #define rpc_s_invalid_vers_option RPC_S_INVALID_VERS_OPTION
00704 #define rpc_s_max_calls_too_small RPC_S_MAX_CALLS_TOO_SMALL
00705 #define rpc_s_mgmt_op_disallowed RPC_S_ACCESS_DENIED
00706 #define rpc_s_name_service_unavailable RPC_S_NAME_SERVICE_UNAVAILABLE
00707 #define rpc_s_no_bindings RPC_S_NO_BINDINGS
00708 #define rpc_s_no_entry_name RPC_S_NO_ENTRY_NAME
00709 #define rpc_s_no_interfaces RPC_S_NO_INTERFACES
00710 #define rpc_s_no_interfaces_exported RPC_S_NO_INTERFACES_EXPORTED
00711 #define rpc_s_no_memory RPC_S_OUT_OF_MEMORY
00712 #define rpc_s_no_more_elements RPC_X_NO_MORE_ENTRIES
00713 #define rpc_s_no_more_bindings RPC_S_NO_MORE_BINDINGS
00714 #define rpc_s_no_more_members RPC_S_NO_MORE_MEMBERS
00715 #define rpc_s_no_ns_permission RPC_S_ACCESS_DENIED
00716 #define rpc_s_no_princ_name RPC_S_NO_PRINC_NAME
00717 #define rpc_s_no_protseqs RPC_S_NO_PROTSEQS
00718 #define rpc_s_no_protseqs_registered RPC_S_NO_PROTSEQS_REGISTERED
00719 #define rpc_s_not_rpc_tower RPC_S_CANNOT_SUPPORT
00720 #define rpc_s_not_supported RPC_S_CANNOT_SUPPORT
00721 #define rpc_s_not_authorized RPC_S_ACCESS_DENIED
00722 #define rpc_s_nothing_to_unexport RPC_S_NOTHING_TO_UNEXPORT
00723 #define rpc_s_object_not_found RPC_S_OBJECT_NOT_FOUND
00724 #define rpc_s_protocol_error RPC_S_PROTOCOL_ERROR
00725 #define rpc_s_protseq_not_supported RPC_S_PROTSEQ_NOT_SUPPORTED
00726 #define rpc_s_server_too_busy RPC_S_SERVER_TOO_BUSY
00727 #define rpc_s_string_too_long RPC_S_STRING_TOO_LONG
00728 #define rpc_s_type_already_registered RPC_S_TYPE_ALREADY_REGISTERED
00729 #define rpc_s_unknown_authn_service RPC_S_UNKNOWN_AUTHN_SERVICE
00730 #define rpc_s_unknown_authz_service RPC_S_UNKNOWN_AUTHZ_SERVICE
00731 #define rpc_s_unknown_if RPC_S_UNKNOWN_IF
00732 #define rpc_s_unknown_mgr_type RPC_S_UNKNOWN_MGR_TYPE
00733 #define rpc_s_unknown_reject RPC_S_CALL_FAILED_DNE
00734 #define rpc_s_unsupported_name_syntax RPC_S_UNSUPPORTED_NAME_SYNTAX
00735 #define rpc_s_unsupported_type RPC_S_UNSUPPORTED_TYPE
00736 #define rpc_s_wrong_boot_time RPC_S_CALL_FAILED_DNE
00737 #define rpc_s_wrong_kind_of_binding RPC_S_WRONG_KIND_OF_BINDING
00738 #define uuid_s_ok RPC_S_OK
00739 #define uuid_s_internal_error RPC_S_INTERNAL_ERROR
00740 #define uuid_s_invalid_string_uuid RPC_S_INVALID_STRING_UUID
00741 #define uuid_s_no_address RPC_S_UUID_NO_ADDRESS
00742
00743
00744
00745
00746
00747 #define rpc_x_comm_failure RPC_S_COMM_FAILURE
00748 #define rpc_x_connect_no_resources RPC_S_OUT_OF_RESOURCES
00749 #define rpc_x_entry_not_found RPC_S_ENTRY_NOT_FOUND
00750 #define rpc_x_incomplete_name RPC_S_INCOMPLETE_NAME
00751 #define rpc_x_invalid_arg RPC_S_INVALID_ARG
00752 #define rpc_x_invalid_binding RPC_S_INVALID_BINDING
00753 #define rpc_x_invalid_bound RPC_X_INVALID_BOUND
00754 #define rpc_x_invalid_endpoint_format RPC_S_INVALID_ENDPOINT_FORMAT
00755 #define rpc_x_invalid_naf_id RPC_S_INVALID_NAF_IF
00756 #define rpc_x_invalid_name_syntax RPC_S_INVALID_NAME_SYNTAX
00757 #define rpc_x_invalid_rpc_protseq RPC_S_INVALID_RPC_PROTSEQ
00758 #define rpc_x_invalid_tag RPC_X_INVALID_TAG
00759 #define rpc_x_invalid_timeout RPC_S_INVALID_TIMEOUT
00760 #define rpc_x_no_memory RPC_X_NO_MEMORY
00761 #define rpc_x_object_not_found RPC_S_OBJECT_NOT_FOUND
00762 #define rpc_x_protocol_error RPC_S_PROTOCOL_ERROR
00763 #define rpc_x_protseq_not_supported RPC_S_PROTSEQ_NOT_SUPPORTED
00764 #define rpc_x_server_too_busy RPC_S_SERVER_TOO_BUSY
00765 #define rpc_x_ss_char_trans_open_fail RPC_X_SS_CHAR_TRANS_OPEN_FAIL
00766 #define rpc_x_ss_char_trans_short_file RPC_X_SS_CHAR_TRANS_SHORT_FILE
00767 #define rpc_x_ss_context_damaged RPC_X_SS_CONTEXT_DAMAGED
00768 #define rpc_x_ss_context_mismatch RPC_X_SS_CONTEXT_MISMATCH
00769 #define rpc_x_ss_in_null_context RPC_X_SS_IN_NULL_CONTEXT
00770 #define rpc_x_string_too_long RPC_S_STRING_TOO_LONG
00771 #define rpc_x_unknown_if RPC_S_UNKNOWN_IF
00772 #define rpc_x_unknown_mgr_type RPC_S_UNKNOWN_MGR_TYPE
00773 #define rpc_x_unsupported_name_syntax RPC_S_UNSUPPORTED_NAME_SYNTAX
00774 #define rpc_x_unsupported_type RPC_S_UNSUPPORTED_TYPE
00775 #define rpc_x_wrong_boot_time RPC_S_CALL_FAILED_DNE
00776 #define rpc_x_wrong_kind_of_binding RPC_S_WRONG_KIND_OF_BINDING
00777 #define uuid_x_internal_error RPC_S_INTERNAL_ERROR
00778
00779 #ifdef __cplusplus
00780 }
00781 #endif
00782
00783 #endif
00784