VMS Help  —  DCE  DCE_RPC, Application Routines, rpc_object_set_inq_fn
 NAME

   rpc_object_set_inq_fn - Registers an object inquiry function

   Used by server applications.

 SYNOPSIS

   #include <dce/rpc.h>

   void rpc_object_set_inq_fn( rpc_object_inq_fn_t inquiry_fn,
                               unsigned32 *status );

 PARAMETERS

   Input

   inquiry_fn
       Specifies a pointer to an object type inquiry function. When an
       application calls the rpc_object_inq_type() routine and the RPC
       runtime finds that the specified object is not registered, the
       runtime automatically calls the rpc_object_inq_type() routine to
       determine the object's type.  Specify NULL to remove a previously
       set inquiry function.

       The following C language definition for rpc_object_inq_fn_t
       illustrates the prototype for this function:

            typedef void (*rpc_object_inq_fn_t)
                    (
                        uuid_t       *object_uuid,  /* in  */
                        uuid_t       *type_uuid,    /* out */
                        unsigned32   *status        /* out */
                    );

       The returned type_uuid and status values are returned as the
       output arguments from the rpc_object_inq_type() routine.
       If you specify NULL, the rpc_object_set_inq_fn() routine
       unregisters (that is, removes) a previously registered object
       type inquiry function.

   Output

   status
       Returns the status code from this routine.  This status code
       indicates whether the routine completed successfully or, if
       not, why not.  The possible status code and its meaning is as
       follows:

       rpc_s_ok    Success.

 DESCRIPTION

   A server application calls rpc_object_set_inq_fn() to specify a
   function to determine an object's type.  If an application privately
   maintains object/type registrations, the specified inquiry function
   returns the type UUID of an object from that registration.

   The RPC runtime automatically calls the inquiry function when the
   application calls rpc_object_inq_type() and the object was not
   previously registered by rpc_object_set_type().  The RPC runtime
   also automatically calls the inquiry function for every remote
   procedure call it receives if the object was not previously
   registered.

 Cautions

   Use this routine with caution.  When the RPC runtime automatically
   calls this routine in response to a received remote procedure call,
   the inquiry function can be called from the context of runtime
   internal threads with runtime internal locks held.  The inquiry
   function should not block or at least not block for long (for example,
   the inquiry function should not perform a remote procedure call).
   Also, the inquiry function must not unwind because of an exception.
   In general, the inquiry function should not call back into the RPC
   runtime.  It is legal to call rpc_object_set_type() or any of the
   uuid_* routines.  Failure to comply with these restrictions will
   result in undefined behavior.

 RETURN VALUES

   No value is returned.

 RELATED INFORMATION

   Functions: rpc_object_inq_type
              rpc_object_set_type
Close Help