"Andrew Talbot" Andrew.Talbot@talbotville.com wrote:
#define IMAGE_FIRST_SECTION(ntheader) \
- ((PIMAGE_SECTION_HEADER)((LPBYTE)&((PIMAGE_NT_HEADERS)(ntheader))->OptionalHeader + \
((PIMAGE_NT_HEADERS)(ntheader))->FileHeader.SizeOfOptionalHeader))
- ((PIMAGE_SECTION_HEADER)((LPBYTE)&((PIMAGE_NT_HEADERS)(UINT32)(ntheader))->OptionalHeader + \
((PIMAGE_NT_HEADERS)(UINT32)(ntheader))->FileHeader.SizeOfOptionalHeader))
UINT32 is not a 64-bit safe type. Please use ULONG_PTR instead.