VMS Help  —  DCE  DCE_RPC, Application Routines, rpc_ns_import_ctx_add_eval
 NAME

   rpc_ns_import_ctx_add_eval - Adds an evaluation routine to an import
                                context

   Used by client applications.

 SYNOPSIS

   #include <dce/rpc.h>

   void rpc_ns_import_ctx_add_eval( rpc_ns_handle_t *import_context,
                                    unsigned32 function_type,
                                    rpc_ns_handle_t *eval_args,
                                    void *eval_func,
                                    void *free_func,
                                    error_status_t *status );

 PARAMETERS

   Input

   import_context
       The name service handle obtained from the
       rpc_ns_binding_import_begin() routine.

   func_type
       The type of evaluation function. This value currently must be
       rpc_cs_code_eval_func.

   eval_args
       An opaque data type that data used by the evaluation routine.
       Client applications adding a DCE RPC code sets evaluation routine
       (rpc_cs_eval_with_universal() or rpc_cs_eval_without_universal())
       specify the server's NSI entry name in this parameter.

   eval_func
       A function pointer to the evaluation routine to be called from
       the rpc_ns_binding_import_next() routine.  The void declaration
       for eval_func means that the function does not return a value.
       Client applications adding a DCE RPC code sets evaluation routine
       (rpc_cs_eval_with_universal() or rpc_cs_eval_without_universal())
       specify the routine name in this parameter.

   free_func
       A function pointer to a routine that is invoked from
       rpc_ns_binding_import_done() and which performs application-
       specific cleanup. Client applications adding a DCE RPC code sets
       evaluation routine (rpc_cs_eval_with_universal() or
       rpc_cs_eval_without_universal()) specify NULL in this parameter.

   Output

   import_context
       Returns the name service handle which contains the
       rpc_ns_binding_import_next() and rpc_ns_binding_import_done()
       routines.

   status
       Returns the status code from this routine.  This status code
       indicates whether the routine completed successfully or, if not,
       why not.

       rpc_s_ok       Success.

       rpc_s_no_memory
                      The RPC runtime could not allocate heap storage.

       rpc_s_invalid_ns_handle
                      The import_context parameter was not valid.

 DESCRIPTION

   The rpc_ns_import_ctx_add_eval() routine adds an evaluation routine to
   an import context created by the rpc_ns_binding_import_begin()
   routine. The evaluation routine adds additional criteria to that used
   by rpc_ns_binding_import_next() (that is, protocol and interface
   information) for importing compatible server binding handles.  Client
   applications call the rpc_ns_import_ctx_add_eval() routine once for
   each evaluation routine to be added to an import context (if there are
   multiple evaluation routines to be set up.)

   If the user-specified evaluation routine needs to perform special
   cleanup functions, such as deleting a temporary file from a disk,
   use the free_func parameter to specify the cleanup routine to be
   called from rpc_ns_binding_import_done().

   For DCE 1.1, client applications that transfer international character
   data in a heterogeneous character set and code set environment use the
   rpc_ns_import_ctx_add_eval() routine to add one or more code sets
   evaluation routines to the import context returned by the
   rpc_ns_binding_import_begin() routine.  When the client application
   calls the rpc_ns_binding_import_next() routine to import compatible
   binding handles for servers, this routine calls the code sets
   evaluation routine, which applies client-server character set and
   code sets compatibility checking as another criteria for compatible
   binding selection.

   The code sets compatibility evaluation routine specified can be one
   of the following:

   rpc_cs_eval_with_universal
       A DCE RPC code sets evaluation routine that evaluates character
       set and code sets compatibility between client and server. If
       client and server character sets are compatible, but their
       supported code sets are not, the routine sets code set tags that
       direct the client and/or server stubs to convert character data
       to either user-defined intermediate code sets (if they exist) or
       the DCE intermediate code set, which is the ISO 10646
       (or "universal") code set.

   rpc_cs_eval_without_universal
       A DCE RPC code sets evaluation routine that evaluates
       character set and code sets compatibility between client and
       server.  If client and server character sets are compatible,
       but their supported code sets are not, the routine attempts to
       return the message rpc_s_no_compat_codesets to the
       rpc_ns_binding_import_next() routine.

   application-supplied-routine
       A user-written code sets evaluation routine. Application
       developers writing internationalized DCE applications can develop
       their own code sets evaluation routines for client-server code
       sets evaluation if the DCE-supplied routines do not meet their
       application's needs.

   Restrictions

   Client applications that add evaluation routines to server binding
   import context cannot use the automatic binding method to bind to a
   server.

   Permissions Required

   No permissions are required.

 RETURN VALUES

   No value is returned.

 RELATED INFORMATION

   Functions: rpc_cs_eval_with_universal
              rpc_cs_eval_without_universal
              rpc_ns_binding_import_begin
              rpc_ns_binding_import_done
              rpc_ns_binding_import_next
              rpc_ns_mgmt_handle_set_exp_age
Close Help