Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Executable load errors suppressed

dim

Dimitry Andric
May
205
1
Hi,

I'm using Take Command 11.00.42 x64. I encountered an executable which
was linked to missing DLLs (in this case, a version of openssl.exe).

When I attempt to run this executable from TCC, I get no error message
whatsoever, but I simply get the prompt back. The exit code (%?) is
then set to 128.

If I run this from cmd.exe, I get a more informative error popup:

===== OpenSSL.exe - Unable To Locate Component

This application has failed to start because LIBEAY32.dll was not
found. Re-installing the application may fix this problem.
=====
Any idea why TCC seems to suppress these popups?
 
> I'm using Take Command 11.00.42 x64. I encountered an executable which
> was linked to missing DLLs (in this case, a version of openssl.exe).
>
> When I attempt to run this executable from TCC, I get no error message
> whatsoever, but I simply get the prompt back. The exit code (%?) is
> then set to 128.
>
> If I run this from cmd.exe, I get a more informative error popup:
>
> ===== OpenSSL.exe - Unable To Locate Component
>
> This application has failed to start because LIBEAY32.dll was not
> found. Re-installing the application may fix this problem.
> ====> Any idea why TCC seems to suppress these popups?

TCC definitely isn't deliberately suppressing anything, though its process
startup is different (much more complex) than CMD.EXE's.

Does it behave the same way if you run the app from TCC 32-bit?

Rex Conn
JP Software
 
> When I attempt to run this executable from TCC, I get no error message
> whatsoever, but I simply get the prompt back. The exit code (%?) is
> then set to 128.

A quick experiment shows that ShellExecute will display that popup, but
CreateProcess does not. (Curiously, CreateProcess immediately returns 1 for
success, which is *partially* true, since it passed the app off to the
loader, and after that it's the loader's problem.)

Since ShellExecute eventually calls CreateProcess, there's apparently some
mystery flag that should be passed, which will require some API hooking &
tracing to determine.

Rex Conn
JP Software
 
On 2010-03-13 02:20, rconn wrote:

> TCC definitely isn't deliberately suppressing anything, though its process
> startup is different (much more complex) than CMD.EXE's.
>
> Does it behave the same way if you run the app from TCC 32-bit?

Yes. The OpenSSL.exe in question is a 32-bit app, btw.
 
On 2010-03-13 03:01, rconn wrote:

> A quick experiment shows that ShellExecute will display that popup, but
> CreateProcess does not.

Strangely enough, in my case, a small program that just calls
CreateProcess (with almost all parameters set to NULL) *will* display
the error popup if run from either 32 or 64-bit cmd.exe, but not from
either 32 or 64-bit tcc.exe...

There is something strange going on. :)
 
> ---Quote---
> > A quick experiment shows that ShellExecute will display that popup, but
> > CreateProcess does not.
> ---End Quote---
> Strangely enough, in my case, a small program that just calls
> CreateProcess (with almost all parameters set to NULL) *will* display
> the error popup if run from either 32 or 64-bit cmd.exe, but not from
> either 32 or 64-bit tcc.exe...
>
> There is something strange going on. :)

The problem turned out to be a third-party dll that was (rather
inconsiderately) changing the error mode and not resetting it when it was
done. I've fixed it for build 44, which should be uploaded in a day or two.

Rex Conn
JP Software
 

Similar threads

Back
Top