You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to check contents in internal with below code but I couldn't access because some structs are defined in cpp file not header file.
string path = ((AnalyzeInput*)input)->second;
string file_name = path.substr(path.find_last_of("/") + 1);
parsed_pe* pe = ParsePEFromFile(path.c_str());
bool is_mallware = false;
if (pe == nullptr) {
handle->on_result(file_name, Results::RES_CANNOT_PARSE_PE);
return;
}
if (pe->internal->secs.size() < 2) {
handle->on_result(file_name, Results::RES_HAS_LESS_SEC);
}
Structs below have to move the definition from parse.cpp to parse.h. parsed_pe_internal has declaration in parse.h but doesn't have member variables so cannot access from code neither.
The non-inclusion of internal structures in pe-parse's headers is intentional. This sounds like a shortcoming of your IDE, not pe-parse itself -- most IDEs should be able to resolve past a forward-declared structure.
To clarify: if what you're looking for is a public (i.e. non-internal) API that gets you access to the section count, you can throw one together with IterSec.
I wanted to check contents in internal with below code but I couldn't access because some structs are defined in cpp file not header file.
Structs below have to move the definition from parse.cpp to parse.h. parsed_pe_internal has declaration in parse.h but doesn't have member variables so cannot access from code neither.
The text was updated successfully, but these errors were encountered: