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

int kLdrModQueryResource ( PKLDRMOD  pMod,
const void *  pvBits,
KLDRADDR  BaseAddress,
KU32  idType,
const char *  pszType,
KU32  idName,
const char *  pszName,
KU32  idLang,
PKLDRADDR  pAddrRsrc,
KSIZE *  pcbRsrc 
)

Queries info about a resource.

If there are multiple resources matching the criteria, the best or first match will be return.

Returns:
0 on success.

Whatever non-zero status returned by pfnCallback (enumeration was stopped).

non-zero kLdr or native status code on failure.

Parameters:
pMod The module.
pvBits Optional pointer to bits returned by kLdrModGetBits() currently located at BaseAddress. This can be used by some module interpreters to reduce memory consumption.
BaseAddress The module base address to use when calculating the resource addresses. There are two special values that can be used: KLDRMOD_BASEADDRESS_LINK and KLDRMOD_BASEADDRESS_MAP.
idType The resource type id to match if not NIL_KLDRMOD_RSRC_TYPE_ID.
pszType The resource type name to match if no NULL.
idName The resource name id to match if not NIL_KLDRMOD_RSRC_NAME_ID.
pszName The resource name to match if not NULL.
idLang The language id to match.
pfnCallback The callback function.
pvUser The user argument for the callback.

Definition at line 588 of file kLdrMod.c.

References KERR_INVALID_PARAMETER, KLDRMOD_VALIDATE, NIL_KLDRADDR, KLDRMODOPS::pfnQueryResource, and KLDRMOD::pOps.

{
    KLDRMOD_VALIDATE(pMod);
    if (!pAddrRsrc && !pcbRsrc)
        return KERR_INVALID_PARAMETER;
    if (pAddrRsrc)
        *pAddrRsrc = NIL_KLDRADDR;
    if (pcbRsrc)
        *pcbRsrc = 0;
    return pMod->pOps->pfnQueryResource(pMod, pvBits, BaseAddress, idType, pszType, idName, pszName, idLang, pAddrRsrc, pcbRsrc);
}


Generated by  Doxygen 1.6.0   Back to index