You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Ludwig Magnusson <lu...@itcatapult.com> on 2009/05/19 09:47:00 UTC

Is it possible to read file-version? (dll-files)

Hi!

I'm not sure this is the right forum but I would like to create a
java-program that can extract the version of a file, in particular
dll-files.  The version number is show if you view the properties for the
file, along with other information. Is it possible to extract this
information in some way? I have not found any methods to do this in the
commons library or in the j2se-api.

Does anyone know of a way to do it?

/Ludwig


RE: Is it possible to read file-version? (dll-files)

Posted by Ludwig Magnusson <lu...@itcatapult.com>.
Thanks for the tip.
I just solved the problem a few hours ago when I found a small program
capable of extracting the information. I just run that program from java
now...
/Ludwig

-----Original Message-----
From: Nation, Carey [mailto:Carey.Nation@turner.com] 
Sent: den 27 maj 2009 17:35
To: Commons Users List
Subject: RE: Is it possible to read file-version? (dll-files)

The version stuff is just a resource in the dll file.  A bit of googling
should tell you how to read the file and find the info.  You'll just
need to open the dll file for read and do what the docs say.  Have a
look on msdn for the file format docs.  This used to be documented in
the SDK docs, but I haven't had to bother with it in a REALLY long time
(way before versioning, actually), so I don't know where exactly to tell
you to look.  It's also a decent bet that things will be different if
the dll is a .net assembly rather than a native dll.  And as a bonus,
the version resource might not be there at all.

Hope this helps, at least a little...


-----Original Message-----
From: Ludwig Magnusson [mailto:ludwig@itcatapult.com] 
Sent: Tuesday, May 19, 2009 3:47 AM
To: user@commons.apache.org
Subject: Is it possible to read file-version? (dll-files)

Hi!

I'm not sure this is the right forum but I would like to create a
java-program that can extract the version of a file, in particular
dll-files.  The version number is show if you view the properties for
the
file, along with other information. Is it possible to extract this
information in some way? I have not found any methods to do this in the
commons library or in the j2se-api.

Does anyone know of a way to do it?

/Ludwig


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


RE: Is it possible to read file-version? (dll-files)

Posted by "Nation, Carey" <Ca...@turner.com>.
The version stuff is just a resource in the dll file.  A bit of googling
should tell you how to read the file and find the info.  You'll just
need to open the dll file for read and do what the docs say.  Have a
look on msdn for the file format docs.  This used to be documented in
the SDK docs, but I haven't had to bother with it in a REALLY long time
(way before versioning, actually), so I don't know where exactly to tell
you to look.  It's also a decent bet that things will be different if
the dll is a .net assembly rather than a native dll.  And as a bonus,
the version resource might not be there at all.

Hope this helps, at least a little...


-----Original Message-----
From: Ludwig Magnusson [mailto:ludwig@itcatapult.com] 
Sent: Tuesday, May 19, 2009 3:47 AM
To: user@commons.apache.org
Subject: Is it possible to read file-version? (dll-files)

Hi!

I'm not sure this is the right forum but I would like to create a
java-program that can extract the version of a file, in particular
dll-files.  The version number is show if you view the properties for
the
file, along with other information. Is it possible to extract this
information in some way? I have not found any methods to do this in the
commons library or in the j2se-api.

Does anyone know of a way to do it?

/Ludwig


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org