Hash :
1beb65cd
Author :
Date :
2023-05-21T12:11:20
Fix compilation with older SDK
Do not use SIZE_T which is not defined in older SDK. There is only size_t
type, so use it instead.
Do not use IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR which is not defined in
older SDK. Use IMAGE_NUMBEROF_DIRECTORY_ENTRIES macro for checking if
directory index is valid. In all SDKs is DataDirectory[] array size defined
from IMAGE_NUMBEROF_DIRECTORY_ENTRIES macro.
Cast members in IMAGE_EXPORT_DIRECTORY and IMAGE_DIRECTORY_ENTRY_IMPORT to
DWORD as in older SDK they are defined as PDWORD and compiler throws error
'cannot add two pointers'.