#include <dbg.hpp> // Present the user with a list of processes to attach to. If there is no executable running that // matches what's open in IDA, no dialog box will be presented. int err; if ((err = attach_process(NO_PROCESS)) == 1) msg("Successfully attached to process.\n"); else msg("Unable to attach, error: %d\n", err);