dr_process_is_registered

Function dr_process_is_registered 

Source
pub unsafe extern "C" fn dr_process_is_registered(
    process_name: *const c_char,
    pid: process_id_t,
    global: bool_,
    dr_platform: dr_platform_t,
    dr_root_dir: *mut c_char,
    dr_mode: *mut dr_operation_mode_t,
    debug: *mut bool_,
    dr_options: *mut c_char,
) -> bool_
Expand description

Check if a process is registered to run under DynamoRIO. To obtain client information, use dr_get_client_info().

\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 queried. If pid == 0, the general configuration for process_name will be queried.

\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 check.

\param[out] dr_root_dir If the process is registered, the root DynamoRIO directory provided at registration. Callers can pass NULL if this value is not needed. Otherwise, the parameter must be a caller-allocated array of length #MAXIMUM_PATH.

\param[out] dr_mode If the process is registered, the mode provided at registration. Callers can pass NULL if this value is not needed.

\param[out] debug If the process is registered, the debug flag provided at registration. Callers can pass NULL if this value is not needed.

\param[out] dr_options If the process is registered, the extra DynamoRIO parameters provided at registration. Callers can pass NULL if this value is not needed. Otherwise, the parameter must be a caller-allocated array of length #DR_MAX_OPTIONS_LENGTH.

\return true if the process is registered for the given platform.