Executable load errors suppressed

dim

Dimitry Andric
May 31, 2008
205
1
Netherlands
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?
 

rconn

Administrator
Staff member
May 14, 2008
12,406
152
> 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
 

rconn

Administrator
Staff member
May 14, 2008
12,406
152
> 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
 

dim

Dimitry Andric
May 31, 2008
205
1
Netherlands
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.
 

dim

Dimitry Andric
May 31, 2008
205
1
Netherlands
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. :)
 

rconn

Administrator
Staff member
May 14, 2008
12,406
152
> ---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
Thread starter Title Forum Replies Date
C V25 eats STDERR from executable extensions Support 8
David McClelland TCMD 24 & Perl - perl thinks it's own executable is ...\TCMD24\TCC.EXE??? Support 3
M How to set Path variable for non-executable file extensions in 4DOS Support 8
T TCHelp executable history? Support 2
Craig Fitzgerald problem with executable extensons with TCC version 19.10.51 x64 Support 3
E How to? use Executable Extensions: .bat and .cmd Support 8
Jay Sage Executable Extension with Lua Support 5
W File completion without space/executable extensions Support 3
P Executable extension problem 2 Support 0
P Executable extension problem 1 Support 7
dcantor Executable file extensions in V10 b 38 Support 5
J History file load hangs if file has complete garbage in it... Support 1
fpefpe eject/load media Support 4
D check for network tcstart.btm and load if newer Support 3
Joe Caverly CPU Load in StatusBar Support 1
E How to? Load Alias File on Startup Support 3
B How to? compatability with free d/load of TCC/LE Support 8
jwblyth How to? Help will not Load in View (File Viewer)?? Support 4
scooter_de TCC 11/TCC 12 - can't load msvcrt-ruby18.dll Support 4
L How to load Tcmd into my private user directory? Support 2
U failure to load plugin Support 5
B bdebugger doesn't load btm-file in window Support 1
old coot Spurious errors (triggered by "for" construct?) when adding/removing "echo" lines Support 2
Jesse Heines Access Denied errors in TCC 27 Support 9
Peter Murschall PIPE Fittings makes Errors Support 3
vefatica What would cause these errors? Support 13
x13 MOUNTISO & MOUNTVHD errors Support 14
Steve Pitts Documentation Script errors invoking help Support 15
nickles Fixed Executing long command lines in a batch generates file name errors Support 16
vefatica Big numbers, strange errors Support 1
D Zip errors on large files. Support 4
vefatica DO /S ... ignore errors? Support 26
samintz HHCTRL errors Support 6
T How to? @files and trapping "no disk in drive errors" Support 4
S WAD %_do_errors does not report errors when loop control variable type is not directory entry Support 1
M How to? Handle errors in both a general and "complete" way... Support 6
dcantor Help file errors Support 0
epement Strawberry Perl batch file errors Support 15
C Unsuppressable errors from XML functions Support 5
dcantor Arithmetic errors in large numbers Support 12
J Two hard to reproduce errors Support 0

Similar threads