Detach from the process currently being debugged. This can be a process that was attached to or run through IDA. Returns false if it was unable to detach. Detaching from a process is only supported on Windows XP SP2 and Windows 2003.
Examples:
#include <dbg.hpp>
// Detach from the debugged process.
if (detach_process())
msg("Successfully detached from process.\n");
else
msg("Failed to detach.\n");