63 if ( pid == Win::_getpid() ) {
66 Win::LPTHREAD_START_ROUTINE
fun;
70 mh = Win::LoadLibrary(
"Kernel32" );
72 fun = (Win::LPTHREAD_START_ROUTINE)Win::GetProcAddress( mh,
"DebugBreak" );
74 ph = Win::OpenProcess( PROCESS_ALL_ACCESS,
TRUE, pid );
76 th = Win::CreateRemoteThread( ph, NULL, 0, fun, 0, 0, &
id );
78 Win::CloseHandle( th );
81 Win::CloseHandle( ph );
84 Win::FreeLibrary( mh );
87 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)