60 if ( pid == Win::_getpid() ) {
63 Win::LPTHREAD_START_ROUTINE
fun;
67 mh = Win::LoadLibrary(
"Kernel32" );
69 fun = (Win::LPTHREAD_START_ROUTINE)Win::GetProcAddress( mh,
"DebugBreak" );
71 ph = Win::OpenProcess( PROCESS_ALL_ACCESS,
TRUE, pid );
73 th = Win::CreateRemoteThread( ph, NULL, 0, fun, 0, 0, &
id );
75 Win::CloseHandle( th );
78 Win::CloseHandle( ph );
81 Win::FreeLibrary( mh );
84 if ( result != 1 ) result = Win::GetLastError();
GAUDI_API long breakExecution()
Break the execution of the application and invoke the debugger.
double fun(const std::vector< double > &x)