MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / peGetImportedModuleByName

Function peGetImportedModuleByName

emmy_hook/src/libpe/libpe.cpp:999–1022  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

997}
998
999PE_STATUS peGetImportedModuleByName( PE *pe, const char *pszName, PE_IMPORT_MODULE **ppModule )
1000{
1001 PE_STATUS status = PE_NOT_PARSED;
1002
1003 if( PE_IS_PARSED( pe, IMPORTS ) == TRUE )
1004 {
1005 if( ppModule != NULL )
1006 {
1007 *ppModule = (PE_IMPORT_MODULE *)ht_get( pe->ImportTable.ByName, (void *)pszName );
1008
1009 status = *ppModule == NULL ? PE_NOT_FOUND : PE_SUCCESS;
1010 }
1011 else
1012 {
1013 status = ht_get( pe->ImportTable.ByName, (void *)pszName ) == NULL ? PE_NOT_FOUND : PE_SUCCESS;
1014 }
1015 }
1016 else if( ppModule != NULL )
1017 {
1018 *ppModule = NULL;
1019 }
1020
1021 return status;
1022}
1023
1024PE_STATUS peGetImportedSymbolByName( PE_IMPORT_MODULE *pModule, const char *pszName, PE_SYMBOL **ppSymbol )
1025{

Callers

nothing calls this directly

Calls 1

ht_getFunction · 0.85

Tested by

no test coverage detected