Changeset 16865


Ignore:
Timestamp:
Jul 10, 2001, 10:41:50 PM (24 years ago)
Author:
bird
Message:

Disallow loading of LX files if env.var. ODIN32.FAIL_IF_UNREGISTEREDLX is set. This fixes the int 3 when running Opera/2 on debug odin.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified tags/trunk/src/kernel32/wprocess.cpp

    r16709 r16865  
    1 /* $Id: wprocess.cpp,v 1.128 2001-07-03 13:23:09 sandervl Exp $ */
     1/* $Id: wprocess.cpp,v 1.129 2001-07-10 20:41:50 bird Exp $ */
    22
    33/*
     
    840840            }
    841841            else {
     842                /* bird 2001-07-10:
     843                 *  let's fail right away instead of hitting DebugInt3s and fail other places.
     844                 *  This is very annoying when running Opera on a debug build with netscape/2
     845                 *  plugins present. We'll make this conditional for the time being.
     846                 */
     847                static BOOL fFailIfUnregisteredLX = -1;
     848                if (fFailIfUnregisteredLX == -1)
     849                    fFailIfUnregisteredLX = getenv("ODIN32.FAIL_IF_UNREGISTEREDLX") != NULL;
     850                if (fExeStarted && fFailIfUnregisteredLX)
     851                {
     852                    dprintf(("KERNEL32: LoadLibraryExA(%s, 0x%x, 0x%x): returns 0x%x. Loaded OS/2 dll %s using DosLoadModule. returns NULL.",
     853                             lpszLibFile, hFile, dwFlags, hDll, szModname));
     854                    SetLastError(ERROR_INVALID_EXE_SIGNATURE);
     855                    return NULL;
     856                }
    842857                dprintf(("KERNEL32: LoadLibraryExA(%s, 0x%x, 0x%x): returns 0x%x. Loaded OS/2 dll %s using DosLoadModule.",
    843858                         lpszLibFile, hFile, dwFlags, hDll, szModname));
     
    16781693        exename++;
    16791694        if (SearchPathA( NULL, &buffer[1], ".exe", sizeof(szAppName), szAppName, NULL ) ||
    1680             SearchPathA( NULL, &buffer[1], NULL, sizeof(szAppName), szAppName, NULL )) 
     1695            SearchPathA( NULL, &buffer[1], NULL, sizeof(szAppName), szAppName, NULL ))
    16811696        {
    16821697            //
Note: See TracChangeset for help on using the changeset viewer.