70 if ( pid == Win::_getpid() ) {
73 Win::LPTHREAD_START_ROUTINE fun;
77 mh = Win::LoadLibrary(
"Kernel32" );
79 fun = (Win::LPTHREAD_START_ROUTINE)Win::GetProcAddress( mh,
"DebugBreak" );
81 ph = Win::OpenProcess( PROCESS_ALL_ACCESS,
TRUE, pid );
83 th = Win::CreateRemoteThread( ph, NULL, 0, fun, 0, 0, &
id );
85 Win::CloseHandle( th );
88 Win::CloseHandle( ph );
91 Win::FreeLibrary( mh );
94 if ( result != 1 ) result = Win::GetLastError();