Skip to content

Commit

Permalink
Error on missing app, and 32-bit apps
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffatrad authored and ryanfleury committed Jan 21, 2024
1 parent dc108d7 commit c02e033
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions src/demon/win32/demon_os_win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -1339,10 +1339,25 @@ demon_os_launch_process(OS_LaunchOptions *options){
AllocConsole();
if (CreateProcessW(0, (WCHAR*)cmd16.str, 0, 0, 1, access_flags, (WCHAR*)env16.str, (WCHAR*)dir16.str,
&startup_info, &process_info)){
CloseHandle(process_info.hProcess);
CloseHandle(process_info.hThread);
result = process_info.dwProcessId;
demon_w32_new_process_pending = 1;
// check if we are 32-bit app, and just close it immediately
BOOL is_wow = 0;
IsWow64Process(process_info.hProcess, &is_wow);
if ( is_wow ){
MessageBox(0,"Sorry, The RAD Debugger only debugs 64-bit applications currently.","Process error",MB_OK|MB_ICONSTOP);
DebugActiveProcessStop(process_info.dwProcessId);
TerminateProcess(process_info.hProcess,0xffffffff);
CloseHandle(process_info.hProcess);
CloseHandle(process_info.hThread);
}
else{
CloseHandle(process_info.hProcess);
CloseHandle(process_info.hThread);
result = process_info.dwProcessId;
demon_w32_new_process_pending = 1;
}
}
else{
MessageBox(0,"Error starting process.","Process error",MB_OK|MB_ICONSTOP);
}
FreeConsole();

Expand Down

0 comments on commit c02e033

Please sign in to comment.