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

static int GetImport ( PKLDRMOD  pMod,
KU32  iImport,
KU32  iSymbol,
const char *  pchSymbol,
KSIZE  cchSymbol,
const char *  pszVersion,
PKLDRADDR  puValue,
KU32 *  pfKind,
void *  pvUser 
) [static]

Callback for resolving the Tst3Ext import.

Definition at line 92 of file tst-3-driver.c.

References KLDRSYMKIND_32BIT, KLDRSYMKIND_64BIT, KLDRSYMKIND_CODE, KLDRSYMKIND_REQ_FLAT, strlen(), and Tst3Ext().

Referenced by TestModule().

{
    if (*pfKind != KLDRSYMKIND_REQ_FLAT)
        return -1;

    if (    !strncmp(pchSymbol, "Tst3Ext", strlen("Tst3Ext"))
        ||  !strncmp(pchSymbol, "_Tst3Ext", strlen("_Tst3Ext")))
    {
        *puValue = (KUPTR)&Tst3Ext;
        *pfKind = KLDRSYMKIND_CODE | (sizeof(pfKind) == 4 ? KLDRSYMKIND_32BIT : KLDRSYMKIND_64BIT);
        return 0;
    }

    return -2;
}


Generated by  Doxygen 1.6.0   Back to index