VMS Help DCE, dce_intro, dced_intro, Server Configuration Control Routines, dced_server_create *Conan The Librarian (sorry for the slow response - running on an old VAX) |
NAME dced_server_create - Creates a DCE server's configuration data for the host's dced SYNOPSIS #include <dce/dced.h> void dced_server_create( dced_binding_handle_t dced_bh, server_t *conf_data, error_status_t *status ); PARAMETERS Input dced_bh Specifies the dced binding handle for the srvrconf service on a specific host. Input/Output conf_data Specifies the configuration data for the server. The dced_intro reference page describes the server_t structure. 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 codes are: error_status_ok db_s_bad_header_type db_s_bad_index_type db_s_iter_not_allowed db_s_key_not_found db_s_readonly db_s_store_failed dced_s_already_exists dced_s_bad_binding dced_s_name_missing sec_acl_invalid_permission DESCRIPTION The dced_server_create() routine creates a server's configuration data. This routine is used by management installation applications to remotely (or locally) establish the data used to control how a DCE server starts. However, it does not create the program or start it. Since this activity is typically part of a server's installation, you can also use dcecp's server create operation. Management applications use the dced_object_read() routine to read the configuration data. Prior to calling dced_server_create(), the application must have established a valid dced binding handle to the srvrconf service by calling either dced_binding_create() or dced_binding_from_rpc_binding(). EXAMPLES The following example shows how to fill in some of the fields of a server_t structure and then create the configuration in dced. dced_binding_handle_t dced_bh; server_t conf; error_status_t status; dced_binding_create( "srvrconf@hosts/katharine", dced_c_binding_syntax_default, &dced_bh, &status ); /* setup a server_t structure */ uuid_create(&conf.id, &status); conf.name = (dced_string_t)"application"; conf.entryname = (dced_string_t)"/.:/development/new_app"; conf.services.count = 1; /* service_t structure(s) */ conf.services.list = malloc( conf.services.count * sizeof(service_t) ); rpc_if_inq_id( application_v1_0_c_ifspec, &(conf.services.list[0].ifspec), &status ); conf.services.list[0].ifname = (dced_string_t)"application"; conf.services.list[0].annotation = (dced_string_t)"A new application"; conf.services.list[0].flags = 0; /* server_fixedattr_t structure */ conf.fixed.startupflags = server_c_startup_explicit | server_c_startup_on_failure; conf.fixed.flags = 0; conf.fixed.program = (dced_string_t)"/usr/users/bin/new_app"; dced_server_create( dced_bh, &conf, &status ); . . . RELATED INFORMATION Routines: dced_object_read dced_binding_create dced_binding_from_rpc_binding dcecp objects: server Books: OSF DCE Application Development Guide.
|