In the official PE documentation, IMAGE_FILE_EXECUTABLE_IMAGE (0x002)
and IMAGE_FILE_DLL (0x2000)
are both flags of the Characteristics
field of the PE-header.
As seen in the IMAGE_FILE_DLL (0x2000)
:
The image file is a dynamic-link library (DLL). Such files are
considered executable files for almost all purposes, although they
cannot be directly run.
However, for IMAGE_FILE_EXECUTABLE_IMAGE (0x002)
:
Image only. This indicates that the image file is valid and can be
run. If this flag is not set, it indicates a linker error.
Since, the DLL cannot be directly run, it may not have the IMAGE_FILE_EXECUTABLE_IMAGE (0x002)
flag set.
I guess, that these flags OR'd toghether would result in an error at load time, but I'm not sure.