Does anyone know an API function to extract an icon resource from an executable file that’s in RAM (inside, say, a MemoryStream)?
All of the icon-extracting functions I’ve seen so far depend on the executable file being present on disk. I’d like to extract the icon without having to write the exe to a temp file, and then loading the resources from it.
This is never a real problem. Windows has the hard requirement that an executable is a file on disk. You can’t start a process otherwise. Since you have to write the file to disk anyway, you never have a problem extracting resources from it with an API that requires a path to a file.