pub unsafe extern "C" fn dr_register_client(
process_name: *const c_char,
pid: process_id_t,
global: bool_,
dr_platform: dr_platform_t,
client_id: client_id_t,
client_pri: usize,
client_path: *const c_char,
client_options: *const c_char,
) -> dr_config_status_tExpand description
Register a client for a particular process. Note that the process must first be registered via dr_register_process() before calling this routine.
\param[in] process_name A NULL-terminated string specifying the name of the target process. The string should identify the base name of the process, not the full path of the executable (e.g., calc.exe).
\param[in] pid A process id of a target process, typically just created and suspended via dr_inject_process_exit(). If pid != 0, the one-time configuration for that pid will be modified. If pid == 0, the general configuration for process_name will be modified.
\param[in] global Whether to use global or user-local config files. On Windows, global config files are stored in a dir pointed at by the DYNAMORIO_HOME registry key. On Linux, they are in /etc/dynamorio. Administrative privileges may be needed if global is true. Note that DynamoRIO gives local config files precedence when both exist. The caller must separately create the global directory.
\param[in] dr_platform Configurations are kept separate for 32-bit processes and 64-bit processes. This parameter allows selecting which of those configurations to set.
\param[in] client_id A client_id_t uniquely identifying the client. DynamoRIO provides the client ID as a parameter to dr_client_main(). Clients use this ID to retrieve client-specific path and option information. Outside entities also identify the target of a nudge via this ID.
\param[in] client_pri The client number, or priority. Client registration includes a value indicating the priority of a client relative to other clients. In multi-client settings, a client’s priority influences event callback ordering. That is, higher priority clients can register their callbacks first; DynamoRIO then calls these routines last. Client priorities range consecutively from 0 to N-1, where N is the number of registered clients. Specify priority 0 to register a client with highest priority.
\param[in] client_path A NULL-terminated string specifying the full path to a valid client library. The string length cannot exceed #MAXIMUM_PATH. The client path may not include any semicolons and when combined with \p client_options may not include all three quote characters (', ", `) simultaneously.
\param[in] client_options A NULL-terminated string specifying options that are available to the client as arguments of dr_client_main() or via dr_get_option_array(). The string length cannot exceed #DR_MAX_OPTIONS_LENGTH. The client options may not include any semicolons and when combined with \p client_path may not include all three quote characters (', ", `) simultaneously.
\return A dr_config_status_t code indicating the result of registration.