naides
April 16th, 2007, 16:22
I have a naive question.
When and how windows decide to treat a PE file as a PE file and load it as an executable?
I always assumed that the file extension determined if a file is executable or not.
I realize that once a primary exe module is loaded in memory, it can, using specific API, load other PE executable file, be it an EXE, DLL, BPL, SYS, others.
Question 1: Is the 3 letter extension of loaded "libraries" an arbitrary choice of the programmer or compiler? or is there a reserved list of extensions for PE libraries?
What about the module that contains the initial thread: Does it have to be named *.exe necessarily?
What about *.com files. Are they able to load libraries in 32bit environments?
What about other extensions? Does the windows loader recognize any other besides .exe?
When and how windows decide to treat a PE file as a PE file and load it as an executable?
I always assumed that the file extension determined if a file is executable or not.
I realize that once a primary exe module is loaded in memory, it can, using specific API, load other PE executable file, be it an EXE, DLL, BPL, SYS, others.
Question 1: Is the 3 letter extension of loaded "libraries" an arbitrary choice of the programmer or compiler? or is there a reserved list of extensions for PE libraries?
What about the module that contains the initial thread: Does it have to be named *.exe necessarily?
What about *.com files. Are they able to load libraries in 32bit environments?
What about other extensions? Does the windows loader recognize any other besides .exe?