Re: CreateProcess

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Omega Red (ignorethis.omegared_at_o2.ignorethis.pl)
Date: 08/28/04


Date: Sat, 28 Aug 2004 15:24:14 +0200

On Sat, 28 Aug 2004 21:10:45 +0800, lqs wrote:

> How to create a process with these:
>
> 1. If the process calls MessageBox function, how to avoid the message window
> showing on the desktop?

You can replace reference to MessageBox in import table of EXE with some
empty code.

> 2. If the process crashes, how to detect the error "XXXX has encountered a
> problem and needs to close. We are sorry for the inconvenience." and avoid
> the error message showing on the desktop?

Either inject some code at the target process start and call
SetUnhandledExceptionFilter() with silent handler, or create the target
process under debug API, it allows the 'debugger' to process exceptions
first. There is probably a way to globally disable this exception window,
but can't remember how.

-- 
Vulnerant omnes, ultima necat.
http://ry.pl/~omega


Relevant Pages

  • Re: Invalid access to memory location for X86_Microsoft.Windows.Common-Controls.... COMCTL32.dll
    ... solution is to use a taskModal MessageBox ... ... If you can get away with using a taskModal MessageBox you can avoid ... the base image to make the inProc option easier to access. ... MessageBoxes and inProc Dialogs. ...
    (comp.lang.smalltalk.dolphin)
  • Re: CString to const char*
    ... (MessageBox instead of MessageBoxA) ... and avoid all the hassle... ... Unfortunately I do not have control over the methods being called, i.e. the socket functions, or are there TCHAR equivilents? ...
    (microsoft.public.vc.language)
  • Macro : confirm Delete
    ... Then a messagebox appears to confirm to delete the data. ... How can I klick "Delete" automatically (or avoid this ...
    (microsoft.public.excel.programming)
  • Re: Detect when ActiveForm changes
    ... instantiated outside of my application (e.g., MessageBox or UITypeEditor ... motivation of this question was to avoid doing that. ...
    (microsoft.public.dotnet.languages.vb)
  • CreateProcess
    ... If the process calls MessageBox function, how to avoid the message window ... the error message showing on the desktop? ...
    (microsoft.public.win32.programmer.kernel)