Traverse the PE file header and enumerate the PE file section. The following is a basic method.
#include
Void Travelpe (const char * filename = "enumwindow.exe"; file * pfile = null; handle hMapping = null; void * pmapping = null; if (filename! = null) {Printf (" FileName is% s / n ", FileName); pFile = (FILE *) CreateFile (FileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (pFile) {printf (!" pFile right / n "); pMapping = CreateFileMapping (pFile, NULL, PAGE_READONLY, 0, 0, 0); if (pMapping!) {printf ( "pMapping right"); pMapping = MapViewOfFile (hMapping, FILE_MAP_READ, 0, 0,0); if (pMapping! ) {