VirtualBox

Changeset 52403 in vbox for trunk/include/iprt/ldr.h


Ignore:
Timestamp:
Aug 18, 2014 8:35:32 PM (10 years ago)
Author:
vboxsync
Message:

SUP,IPRT: Extended RTLdrQueryPropEx with a pvBits parameter, RTLDRPROP_IMPORT_COUNT and RTLDRPROP_IMPORT_MODULE. Hook LdrLoadDll to validate DLLs before they get to NtCreateSection and the loader code/data can be messed up (windows 7 / 32-bit crash). Allow the kernel to buffer the log file, no real need that each write hits the disk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/ldr.h

    r52213 r52403  
    10021002    RTLDRPROP_SIGNATURE_CHECKS_ENFORCED,
    10031003
     1004    /** Number of import or needed modules. */
     1005    RTLDRPROP_IMPORT_COUNT,
     1006    /** Import module by index (32-bit) stored in the buffer. */
     1007    RTLDRPROP_IMPORT_MODULE,
     1008
    10041009    /** End of valid properties.  */
    10051010    RTLDRPROP_END,
     
    10241029 * @param   hLdrMod         The module handle.
    10251030 * @param   enmLdrProp      The property to query.
    1026  * @param   pvBuf           Pointer to the return buffer.
    1027  * @param   cbBuf           The size of the return buffer.
     1031 * @param   pvBuf           Pointer to the input / output buffer.  In most cases
     1032 *                          it's only used for returning data.
     1033 * @param   cbBuf           The size of the buffer.
    10281034 */
    10291035RTDECL(int) RTLdrQueryProp(RTLDRMOD hLdrMod, RTLDRPROP enmProp, void *pvBuf, size_t cbBuf);
     
    10461052 * @param   hLdrMod         The module handle.
    10471053 * @param   enmLdrProp      The property to query.
    1048  * @param   pvBuf           Pointer to the return buffer.
    1049  * @param   cbBuf           The size of the return buffer.
     1054 * @param   pvBits          Optional pointer to bits returned by
     1055 *                          RTLdrGetBits().  This can be utilized by some module
     1056 *                          interpreters to reduce memory consumption and file
     1057 *                          access.
     1058 * @param   pvBuf           Pointer to the input / output buffer.  In most cases
     1059 *                          it's only used for returning data.
     1060 * @param   cbBuf           The size of the buffer.
    10501061 * @param   pcbRet          Where to return the amount of data returned.  On
    10511062 *                          buffer size errors, this is set to the correct size.
    10521063 *                          Optional.
    10531064 */
    1054 RTDECL(int) RTLdrQueryPropEx(RTLDRMOD hLdrMod, RTLDRPROP enmProp, void *pvBuf, size_t cbBuf, size_t *pcbBuf);
     1065RTDECL(int) RTLdrQueryPropEx(RTLDRMOD hLdrMod, RTLDRPROP enmProp, void *pvBits, void *pvBuf, size_t cbBuf, size_t *pcbBuf);
    10551066
    10561067
Note: See TracChangeset for help on using the changeset viewer.

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