VirtualBox

Changeset 35183 in vbox for trunk/src/VBox/Runtime/r3/win


Ignore:
Timestamp:
Dec 16, 2010 1:59:44 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
69022
Message:

RTLdrLoadEx use RTERRINFO.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/win/ldrNative-win.cpp

    r35152 r35183  
    4040
    4141
    42 int rtldrNativeLoad(const char *pszFilename, uintptr_t *phHandle, uint32_t fFlags, char *pszError, size_t cbError)
     42int rtldrNativeLoad(const char *pszFilename, uintptr_t *phHandle, uint32_t fFlags, PRTERRINFO pErrInfo)
    4343{
    4444    Assert(sizeof(*phHandle) >= sizeof(HMODULE));
     
    5353        char *psz = (char *)alloca(cch + sizeof(".DLL"));
    5454        if (!psz)
    55             return VERR_NO_MEMORY;
     55            return RTErrInfoSet(pErrInfo, VERR_NO_MEMORY, "alloca failed");
    5656        memcpy(psz, pszFilename, cch);
    5757        memcpy(psz + cch, ".DLL", sizeof(".DLL"));
     
    7474    DWORD dwErr = GetLastError();
    7575    int   rc    = RTErrConvertFromWin32(dwErr);
    76     if (cbError)
    77         RTStrPrintf(pszError, cbError, "GetLastError=%u", dwErr);
    78     return rc;
     76    return RTErrInfoSetF(pErrInfo, rc, "GetLastError=%u", dwErr);
    7977}
    8078
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette