VirtualBox

Changeset 46593 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Jun 17, 2013 2:32:51 PM (11 years ago)
Author:
vboxsync
Message:

updates

Location:
trunk/include/iprt
Files:
2 edited

Legend:

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

    r46273 r46593  
    195195 * resolution of subsequently loaded libraries. */
    196196#define RTLDRLOAD_FLAGS_GLOBAL      RT_BIT_32(0)
     197/** Do not unload the library upon RTLdrClose. (For system libs.) */
     198#define RTLDRLOAD_FLAGS_NO_UNLOAD   RT_BIT_32(1)
    197199/** The mask of valid flag bits. */
    198 #define RTLDRLOAD_FLAGS_VALID_MASK  UINT32_C(0x00000001)
     200#define RTLDRLOAD_FLAGS_VALID_MASK  UINT32_C(0x00000003)
    199201/** @} */
     202
     203/**
     204 * Loads a dynamic load library (/shared object) image file residing in one of
     205 * the default system library locations.
     206 *
     207 * Only the system library locations are searched. No suffix is required.
     208 *
     209 * @returns iprt status code.
     210 * @param   pszFilename Image filename. No path.
     211 * @param   fNoUnload   Do not unload the library when RTLdrClose is called.
     212 * @param   phLdrMod    Where to store the handle to the loaded module.
     213 */
     214RTDECL(int) RTLdrLoadSystem(const char *pszFilename, bool fNoUnload, PRTLDRMOD phLdrMod);
     215
     216/**
     217 * Combines RTLdrLoadSystem and RTLdrGetSymbol, with fNoUnload set to true.
     218 *
     219 * @returns The symbol value, NULL on failure.  (If you care for a less boolean
     220 *          status, go thru the necessary API calls yourself.)
     221 * @param   pszFilename Image filename. No path.
     222 * @param   pszSymbol       Symbol name.
     223 */
     224RTDECL(void *) RTLdrGetSystemSymbol(const char *pszFilename, const char *pszSymbol);
    200225
    201226/**
     
    210235 */
    211236RTDECL(int) RTLdrLoadAppPriv(const char *pszFilename, PRTLDRMOD phLdrMod);
     237
     238/**
     239 * Gets the native module handle for a module loaded by RTLdrLoad, RTLdrLoadEx,
     240 * RTLdrLoadSystem,  or RTLdrLoadAppPriv.
     241 *
     242 * @returns Native handle on success, ~(uintptr_t)0 on failure.
     243 * @param   hLdrMod     The loader module handle.
     244 */
     245RTDECL(uintptr_t) RTLdrGetNativeHandle(RTLDRMOD hLdrMod);
     246
    212247
    213248/**
     
    359394RTDECL(int) RTLdrGetSymbolEx(RTLDRMOD hLdrMod, const void *pvBits, RTLDRADDR BaseAddress, const char *pszSymbol,
    360395                             PRTLDRADDR pValue);
     396
     397
     398/**
     399 * Gets the address of a named exported function.
     400 *
     401 * Same as RTLdrGetSymbol, but skips the status code and pointer to return
     402 * variable stuff.
     403 *
     404 * @returns Pointer to the function if found, NULL if not.
     405 * @param   hLdrMod         The loader module handle.
     406 * @param   pszSymbol       Function name.
     407 */
     408RTDECL(PFNRT) RTLdrGetFunction(RTLDRMOD hLdrMod, const char *pszSymbol);
    361409
    362410/**
  • trunk/include/iprt/mangling.h

    r46567 r46593  
    632632# define RTLdrGetEndian                                 RT_MANGLER(RTLdrGetEndian)
    633633# define RTLdrGetFormat                                 RT_MANGLER(RTLdrGetFormat)
     634# define RTLdrGetFunction                               RT_MANGLER(RTLdrGetFunction)
     635# define RTLdrGetNativeHandle                           RT_MANGLER(RTLdrGetNativeHandle)
    634636# define RTLdrGetSuff                                   RT_MANGLER(RTLdrGetSuff)
    635637# define RTLdrGetSymbol                                 RT_MANGLER(RTLdrGetSymbol)
    636638# define RTLdrGetSymbolEx                               RT_MANGLER(RTLdrGetSymbolEx)
     639# define RTLdrGetSystemSymbol                           RT_MANGLER(RTLdrGetSystemSymbol)
    637640# define RTLdrGetType                                   RT_MANGLER(RTLdrGetType)
    638641# define RTLdrIsLoadable                                RT_MANGLER(RTLdrIsLoadable)
     
    642645# define RTLdrLoadAppPriv                               RT_MANGLER(RTLdrLoadAppPriv)
    643646# define RTLdrLoadEx                                    RT_MANGLER(RTLdrLoadEx)
     647# define RTLdrLoadSystem                                RT_MANGLER(RTLdrLoadSystem)
    644648# define RTLdrOpen                                      RT_MANGLER(RTLdrOpen)
    645649# define RTLdrOpenInMemory                              RT_MANGLER(RTLdrOpenInMemory)
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