'How to load 16-bit executables (NE) for resources?

Is it possible to open a 16-bit Windows executable, just to browse its resources? I want to use LoadLibraryEx with LOAD_LIBRARY_AS_IMAGE_RESOURCE | LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE, so there is no worry about incompatibility with 64-bit processor, but it is still rejected, saying that it must be a valid Win32 executable. What was the function used to load 16-bit executables then?



Solution 1:[1]

16-bit NE images cannot be loaded nor (directly) executed by 32-bit or 64-bit PE threads. You have to load such a file using ReadFile() or similar and dissect yourself. Despite that RC files are mostly compatible, 16-bit resources are completely differently organized than 32-bit resources. Most notably, there is no language subdirectory level.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Henrik Haftmann