Skip to main content

dr_register_syswide

Function dr_register_syswide 

Source
pub unsafe extern "C" fn dr_register_syswide(
    dr_platform: dr_platform_t,
    dr_root_dir: *const c_char,
) -> dr_config_status_t
Expand description

Sets up systemwide injection so that registered applications will run under DynamoRIO however they are launched (i.e., they do not need to be explicitly invoked with the drrun or drinject tools). This requires administrative privileges and affects all users (though configurations remain private to each user). On Windows NT, a reboot is required for this to take effect.

\param[in] dr_platform Configurations are kept separate for 32-bit processes and 64-bit processes. This parameter allows selecting which of those to use.

\param[in] dr_root_dir The root DynamoRIO directory.

\return A dr_config_status_t code indicating the result of the operation. The operation will fail if the caller does not have sufficient privileges.

\note On Windows, an application that does not link with user32.dll will not be run under control of DynamoRIO via systemwide injection. Such applications will only be under DynamoRIO control if launched by the drrun or drinject tools or if the parent process (typically explorer.exe, for manually launched applications) is already under DynamoRIO control (the parent can be in any mode, but a 32-bit parent cannot inject into a 64-bit child). Only some small non-graphical applications do not link with user32.dll.

\note Not yet available on Linux or MacOS.