Changeset 3398 for trunk/src


Ignore:
Timestamp:
Apr 16, 2000, 6:27:38 AM (25 years ago)
Author:
bird
Message:

Added argument pszAltPath to method findDll. This argument may hold
an alternative executable search path. Intented for LoadLibraryEx flag
LOAD_WITH_ALTERED_SEARCH_PATH.

Location:
trunk/src/kernel32
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/winimagebase.cpp

    r3397 r3398  
    1 /* $Id: winimagebase.cpp,v 1.15 2000-04-16 04:19:57 bird Exp $ */
     1/* $Id: winimagebase.cpp,v 1.16 2000-04-16 04:27:37 bird Exp $ */
    22
    33/*
     
    166166 * @param     cchFullname   Size of the buffer pointer to by pszFullname.
    167167 *                          (A length of at least CCHMAXPATH is recommended.)
    168  * @parm      pszAltPath    Pointer to alternate first path. If this is NULL
    169  *                          (which is it by default) the executable path
    170  *                          is used. If this is specified, this path is used
    171  *                          instead. This is intented used to implement the
    172  *                          LoadLibraryEx flag LOAD_WITH_ALTERED_SEARCH_PATH.
     168 * @parm      pszAltPath    Pointer to alternate first executable path. This
     169 *                          will include a filename or at least a backslash at
     170 *                          the end.
     171 *                          If this is NULL (which is it by default) the
     172 *                          executable path is used. If this is specified,
     173 *                          this path is used instead. This is intented used
     174 *                          to implement the LoadLibraryEx flag
     175 *                          LOAD_WITH_ALTERED_SEARCH_PATH.
    173176 *
    174177 * @status    Completely implemented.
     
    258261        {
    259262            case FINDDLL_EXECUTABLEDIR:
    260                 if (!pszAltPath)
     263                if (pszAltPath)
     264                    pszPath = strcpy(plv->szPath, pszAltPath);
     265                else
    261266                {
    262267                    /* ASSUMES: getFullPath allways returns a fully qualified
     
    265270                     */
    266271                    pszPath = strcpy(plv->szPath, WinExe->getFullPath());
    267                     psz = strrchr(plv->szPath, '\\');
    268                     dassert(psz, ("KERNEL32:Win32ImageBase::findDll(%s, 0x%08x, %d): "
    269                             "WinExe->getFullPath returned a path not fully qualified: %s",
    270                             pszFileName, pszFullName, cchFullName, pszPath));
    271                     if (psz)
    272                         *psz = '\0';
    273                     else
    274                         continue;
    275272                }
     273                psz = strrchr(plv->szPath, '\\');
     274                dassert(psz, ("KERNEL32:Win32ImageBase::findDll(%s, 0x%08x, %d): "
     275                        "WinExe->getFullPath returned a path not fully qualified: %s",
     276                        pszFileName, pszFullName, cchFullName, pszPath));
     277                if (psz)
     278                    *psz = '\0';
    276279                else
    277                     pszPath = pszAltPath;
     280                    continue;
    278281                break;
    279282
  • trunk/src/kernel32/winimagebase.h

    r3397 r3398  
    1 /* $Id: winimagebase.h,v 1.4 2000-04-16 04:19:58 bird Exp $ */
     1/* $Id: winimagebase.h,v 1.5 2000-04-16 04:27:38 bird Exp $ */
    22
    33/*
Note: See TracChangeset for help on using the changeset viewer.