Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » FindFile::IsExecutable() [Feature request]
Re: FindFile::IsExecutable() [Feature request] [message #25720 is a reply to message #25719] Tue, 09 March 2010 11:39 Go to previous messageGo to previous message
koldo is currently online  koldo
Messages: 3435
Registered: August 2008
Senior Veteran
Hello all

Perhaps the simplest and most general way to detect an executable file in Windows is the "MZ" (0x4d, 0x5a) magic number in the first two bytes.

Now there are more complex formats but all of them have an MZ in the beginning.

I think the IsExecutable() in windows would work like this:

1. Check file extension (.exe, .scr, .com, ...¿?)
2. Check MZ signature


Best regards
Iñaki
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Format(Time time, bool seconds) problem
Next Topic: CParser enhancements
Goto Forum:
  


Current Time: Wed May 14 08:19:56 CEST 2025

Total time taken to generate the page: 0.03489 seconds