libPeConv
A library to load, manipulate, dump PE files.
Loading...
Searching...
No Matches
function_resolver.cpp
Go to the documentation of this file.
2
3#include <iostream>
4
6{
8 if (libBasePtr == NULL) {
9 std::cerr << "Could not load the library: " << lib_name << std::endl;
10 return NULL;
11 }
13 if (hProc == NULL) {
15 //is only the first WORD filled?
16 bool is_ord = (func_val & (0x0FFFF)) == func_val;
17 std::cerr << "Could not load the function: " << lib_name << ".";
18 if (is_ord) {
19 std::cerr << std::hex << "0x" << func_val;
20 }
21 else {
22 std::cerr << func_name;
23 }
24 std::cerr << std::endl;
25 return NULL;
26 }
27 return hProc;
28}
virtual FARPROC resolve_func(LPCSTR lib_name, LPCSTR func_name)
bool parse_delayed_desc(BYTE *modulePtr, const size_t moduleSize, const ULONGLONG img_base, LPSTR lib_name, const T_FIELD ordinal_flag, IMAGE_DELAYLOAD_DESCRIPTOR *desc, peconv::t_function_resolver *func_resolver)
Definitions of basic Imports Resolver classes. They can be used for filling imports when the PE is lo...