   Reading resources from PE-files
  Hello!After parsing several directory-entries of the PE-format (imports, exports, delayed imports/exports) im a bit stuck at parsing resources.I successfully get the roots of the tree, the categories, of the resources. My application hast some some dialogs, a menu and a manifest. Thats correctly reflected by the output of my code. Now i want to go to the next node of the tree. Im using the following code:DWORD dwOffset = pEntries.OffsetToData & ~0x80000000;PIMAGE_RESOURCE_DIRECTORY_ENTRY pNext = (PIMAGE_RESOURCE_DIRECTORY_ENTRY)(((LPBYTE)pResDir) + dwOffset);The problem is now, that pNext is completly filled with 0. Name/Id and Offset are 0. That of course should not be. What am i doing wrong? This is my code:void PEFile::InitResources(){DWORD dwResRVA = m_ntHeader.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_RESOURCE].VirtualAddress;PIMAGE_RESOURCE_DIRECTORY pResDir = (PIMAGE_RESOURCE_DIRECTORY)GetAbsolutePtr(dwResRVA);if(!pResDir)return;PIMAGE_RESOURCE_DIRECTORY_ENTRY pEntries = (PIMAGE_RESOURCE_DIRECTORY_ENTRY)(((LPBYTE)pResDir) + sizeof(IMAGE_RESOURCE_DIRECTORY));for(UINT32 i = 0; i < pResDir->NumberOfNamedEntries; ++i){if(pEntries.NameIsString){DWORD dwOffset = pEntries.NameOffset;DWORD dwNameRVA = dwOffset + dwResRVA;PIMAGE_RESOURCE_DIRECTORY_STRING str = (PIMAGE_RESOURCE_DIRECTORY_STRING)GetAbsolutePtr(dwNameRVA);if(str)std::cout << str->NameString << std::endl;}elsestd::cout << "ID: " << pEntries.Id << std::endl;if(pEntries.DataIsDirectory)std::cout << "-> Subdirectory" << std::endl;elsestd::cout << "-> Data" << std::endl;}for(UINT32 i = pResDir->NumberOfNamedEntries, j = 0; j < pResDir->NumberOfIdEntries; ++i, ++j){if(pEntries.Name & 0x80000000){DWORD dwOffset = pEntries.Name & ~0x80000000;DWORD dwNameRVA = dwOffset + dwResRVA;PIMAGE_RESOURCE_DIRECTORY_STRING str = (PIMAGE_RESOURCE_DIRECTORY_STRING)GetAbsolutePtr(dwNameRVA);if(str)std::cout << str->NameString << std::endl;}if(pEntries.DataIsDirectory){if(pEntries.Id <= (WORD)RT_MANIFEST){std::cout << "Collection of " << gResourceTypes[pEntries.Id - 1] << "'s found!" << std::endl;}DWORD dwOffset = pEntries.OffsetToData & ~0x80000000;PIMAGE_RESOURCE_DIRECTORY_ENTRY pNext = (PIMAGE_RESOURCE_DIRECTORY_ENTRY)(((LPBYTE)pResDir) + dwOffset);if(pNext)RecursiveParseResource((DWORD)pResDir, pNext);}elsestd::cout << "Is data!" << std::endl;}}GreetingsPlerion   