Hi,

> Is there a way to determine the version of Delphi
> used to compile a program by examining the
> executable?
Yes, do the next:
1. load exe via LoadLibraryEx with
LOAD_LIBRARY_AS_DATAFILE parameter

2. enumerate all resources (EnumResourceTypes
function)

3. for every resource with RT_RCDATA type, enumerate
the resource names (EnumResourceNames function)

4. if you'll find the DVCLAL resource, then this is
the Delphi exe-file

5. to get the version of used Delphi you need read the
stored value for this resource (DVCLAL) and compare
with predefined value (every Delphi have the own fixed
value). For example, for Delphi 3 is:
A2 8C DF 98 7B 3C 3A 79 26 71 3F 09 0F 2A 25 17

6. if you need also get the list of used dcu-files,
search for resource with PACKAGEINFO name

With best regards, Mike Shkolnik
EMail: [EMAIL PROTECTED]
http://www.scalabium.com

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to