Update loadup.hpp

master
xerox 4 years ago
parent 8c6a0f1b9d
commit e0e0619949

@ -266,10 +266,10 @@ namespace driver
RtlInitAnsiString(&driver_rep_path_cstr, reg_path.c_str()); RtlInitAnsiString(&driver_rep_path_cstr, reg_path.c_str());
RtlAnsiStringToUnicodeString(&driver_reg_path_unicode, &driver_rep_path_cstr, true); RtlAnsiStringToUnicodeString(&driver_reg_path_unicode, &driver_rep_path_cstr, true);
const bool unload_drv = !reinterpret_cast<nt_unload_driver_t>(lp_nt_unload_drv)(&driver_reg_path_unicode); const auto unload_drv = !reinterpret_cast<nt_unload_driver_t>(lp_nt_unload_drv)(&driver_reg_path_unicode);
const auto image_path = util::get_service_image_path(service_name); const auto image_path = util::get_service_image_path(service_name);
const auto delete_image = std::filesystem::remove(image_path); const auto delete_image = std::filesystem::remove(image_path);
const bool delete_reg = util::delete_service_entry(service_name); const auto delete_reg = util::delete_service_entry(service_name);
return unload_drv && delete_reg && delete_reg; return unload_drv && delete_reg && delete_reg;
} }

Loading…
Cancel
Save