Создано: 28 июля 2017 22:21 · Поправил: plutos New! Цитата · Личное сообщение · #2
According to the Microsoft PE and COFF Specification SizeOfRawData is zero when: When a section contains only uninitialized data, this field (SizeOfRawData) should be zero. (This is also true if the section only contains initialized data which is initialized to 0.)
If you have a section with SizeOfRawData = 0, you should: •Take the VirtualSize field of this section •Allocate the resulting size with VirtualAlloc()
You don't have to round up the VirtualSize because VirtualAlloc() will take care of allocating to the next multiple of the page size granularity (as given by GetSystemInfo and the SYSTEM_INFO.dwPageSize field).