1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Executable load errors suppressed

Discussion in 'Support' started by dim, Mar 12, 2010.

  1. dim

    dim Dimitry Andric

    Joined:
    May 31, 2008
    Messages:
    203
    Likes Received:
    0
    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?
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,870
    Likes Received:
    83
    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
     
  3. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,870
    Likes Received:
    83
    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
     
  4. dim

    dim Dimitry Andric

    Joined:
    May 31, 2008
    Messages:
    203
    Likes Received:
    0
    On 2010-03-13 02:20, rconn wrote:

    Yes. The OpenSSL.exe in question is a 32-bit app, btw.
     
  5. dim

    dim Dimitry Andric

    Joined:
    May 31, 2008
    Messages:
    203
    Likes Received:
    0
    On 2010-03-13 03:01, rconn wrote:

    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. :)
     
  6. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,870
    Likes Received:
    83
    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
     

Share This Page