Logo Search packages:      
Sourcecode: virtualbox-ose version File versions

int kLdrDyldQuerySymbol ( HKLDRMOD  hMod,
KU32  uSymbolOrdinal,
const char *  pszSymbolName,
const char *  pszSymbolVersion,
KUPTR *  pValue,
KU32 *  pfKind 
)

Queries the value and type of a symbol.

Returns:
0 on success and pValue and pfKind set.

KERR_INVALID_HANDLE or KLDR_ERR_SYMBOL_NOT_FOUND on failure.

Parameters:
hMod The module handle.
uSymbolOrdinal The symbol ordinal. This is ignored if pszSymbolName is non-zero.
pszSymbolName The symbol name.
pszSymbolVersion The symbol version. Optional.
pValue Where to put the symbol value. Optional if pfKind is non-zero.
pfKind Where to put the symbol kind flags. Optional if pValue is non-zero.

Definition at line 538 of file kLdrDyld.c.

References K_VALIDATE_OPTIONAL_STRING, KERR_INVALID_PARAMETER, KLDRDYLD_VALIDATE_HKLDRMOD, kldrDyldDoQuerySymbol(), kLdrDyldSemRelease(), and kLdrDyldSemRequest().

Referenced by main().

{
    int rc;

    /* validate & initialize */
    if (pfKind)
        *pfKind = 0;
    if (pValue)
        *pValue = 0;
    if (!pfKind && !pValue)
        return KERR_INVALID_PARAMETER;
    KLDRDYLD_VALIDATE_HKLDRMOD(hMod);
    K_VALIDATE_OPTIONAL_STRING(pszSymbolName);

    /* get sem & do work */
    rc = kLdrDyldSemRequest();
    if (!rc)
    {
        rc = kldrDyldDoQuerySymbol(hMod, uSymbolOrdinal, pszSymbolName, pValue, pfKind);
        kLdrDyldSemRelease();
    }
    return rc;
}


Generated by  Doxygen 1.6.0   Back to index