Ask a Question related to PERL Modules, Design and Development.
-
Frank Foss #1
Newbie: How to read metadata from a windows DLL
Greetings!
If you will forgive a newbie, I'll try to explain what I want to do.
(Googling wasn't really successful in this case, since I don't know where to
begin.)
My company is making software, and part of the release notes are details
about the files included in the release, timestamp, version, checksum, and
so on. This info is gathered in a very manual process:
In Windows Explorer, highlighting the file, ALT+Enter to bring up a
"Properties" window.
In this window, there are tabs, "General","Version", and so on.
What I would like to do, is to write a quick Perl script that will traverse
a directory,
look "inside" each .DLL or what ever type of file, read the metadata
attributes, and write to a file.
I am using ActiveState Perl, 5.6.1 on Windows 2000.
Guess my questions are:
Is there a Perl module that allows me to read this info from the files?
What methods to use?
Examples of code to do this?
Module to compute checksums?
Thanks in advance,
Foz
Frank Foss Guest
-
Getting Metadata from Photoshop files to be Read in Acrobat
I'm trying to get metadata from Photoshop it be read by the Read Aloud feature iin Acrobat 7. I can add it in Acrobat, but I want the images... -
Read FLV metadata using CF
Can coldfusion read FLV metadata natively? I need to extract a metadata value and use it to build an XML doc that that then gets passed into the... -
how can you read the *metadata* in a doc file using coldfusion please?
Hi all, Anyone know how to do this? if you right click on a doc file, go to properties and then go to the summary tab, you can find information... -
using coldfusion to read the *metadata* from a word .doc file
Hi all, Anyone know how to do this? if you right click on a doc file, go to properties and then go to the summary tab, you can find information... -
newbie: cgi,read URI
Hello Newsgroup, i´m a newbie and work on a ruby 1.8, an apache 1.3, modruby and eruby and use it in the cgi-version i just want to get the... -
Purl Gurl #2
Re: Newbie: How to read metadata from a windows DLL
Frank Foss wrote:
(snipped)
> What I would like to do, is to write a quick Perl script that will traverse
> a directory, look "inside" each .DLL or what ever type of file, read the metadata
> attributes, and write to a file.
You will do better, as a software writer, to learn about
writing software. It is clear you do not hold enough
knowledge to tackle this task.
Windows dll files appear as three basic types, with a number
of variations on each. Should you elect to research and read,
elect to learn, you will discover windows dll files can be
sixteen bit, thirty-two bit Win9.x and thirty-two bit NT types.
Sixteen bit dll files can be used with FAT32 Win systems.
NT types, depending on which NT version, can run under
FAT32 or NTFS file systems, but usually not both.
There are thousands of gray market (third party) dll files
which may or may not comply with expected standards, and often
run under both sixteen bit and thirty-two bit Win systems.
Many gray market dll files are installed with default Win
installations. Some gray market dll files are written for
sixteen bit and thirty-two bit, both Win9x and Win NT.
Differences here are in how these various dll files are accessed.
Older sixteen bit, Win9.x 32 bit and gray market sixteen/thirty-two
bit dll files, usually require a compiled C language executable
to access information. NT NTFS dll files can be accessed, to a degree,
with WIN32 API perl modules designed solely for NT.
Other choices are compiled binaries and Visual Basic scripts, both
dependent upon Windows version. There are many commercial compiled
binaries written specifically for working with Win dll files. For
a low level beginner, such as yourself, your money will be wisely
invested in the skills of a professional.
Your Win2k system will include all dll types being NT 5 enhanced
for limited compatibility with older 16/32 bit DOS software. You
may or may not be able to access those dll files depending on how
your Win2k system is installed.
My suggestion is you hit those "reference books" and learn about
what you clearly don't know. You will not do well writing software
based upon this lack of knowledge you display. Personally, I don't
think you can write any Windows software with your not knowing even
the simple basics of Win dll files.
Research, read and learn, or pay a professional to do your work.
I am curious why you want to pull information for _all_ dll files
when only a limited number are needed for any given software. You
are aware of this, yes? I tend to believe you are unaware many
dll files depend on other dll files which depend on....
Purl Gurl
Purl Gurl Guest
-
Bob Walton #3
Re: Newbie: How to read metadata from a windows DLL
Frank Foss wrote:
....
> My company is making software, and part of the release notes are details
> about the files included in the release, timestamp, version, checksum, and
> so on. This info is gathered in a very manual process:
> In Windows Explorer, highlighting the file, ALT+Enter to bring up a
> "Properties" window.
> In this window, there are tabs, "General","Version", and so on.
>
> What I would like to do, is to write a quick Perl script that will traverse
> a directory,
> look "inside" each .DLL or what ever type of file, read the metadata
> attributes, and write to a file.
>
> I am using ActiveState Perl, 5.6.1 on Windows 2000.
>
> Guess my questions are:
> Is there a Perl module that allows me to read this info from the files?
I'm not aware of any, but you might check on CPAN. Maybe something
like Win32::File::Ver ?
[url]http://www.cpan.org[/url]
> What methods to use?
> Examples of code to do this?
> Module to compute checksums?
You might check the Digest::MD5 module.
....>
> Foz
Here is some really kludgy code to return the
version number of a typical DLL file. It works
for both 16-bit and 32-bit DLL's, but knows nothing
of the real file format of a DLL, and could
conceivably be fooled. This is an excerpt from a
program I use to look for "DLL Hell" on my computer.
Start with the full path to the DLL in $fn and the
base file name in $file:
open IN,$fn or die "Oops, couldn't open $fn, $!";
binmode IN;
$in='';while(read(IN,$a,4000)){$in.=$a}
close IN;
if($in=~/\0F\0i\0l\0e\0V\0e\0r\0s\0i\0o\0n\0(.{30})/){
$ver=$1;
while($ver=~s/([^\0])\0([^\0])/$1$2/g){};
$ver=~s/^\0+//;
$ver=~s/^([^\0]+).*/$1/;
$file=$file."|$ver";
}
elsif($in=~/\0FileVersion\0(.{30})/){
$ver=$1;
$ver=~s/^\0+//;
$ver=~s/^([^\0]+).*/$1/;
$file=$file."|$ver";
}
else{
$file=$file."|--not specified--";
}
print $file;
You can probably find some more "meta-info" near the places
where the FileVersion appears. HTH.
--
Bob Walton
Bob Walton Guest
-
Frank Foss #4
Newbie: How to read metadata from a windows DLL
Greetings!
If you will forgive a newbie, I'll try to explain what I want to do.
(Googling wasn't really successful in this case, since I don't know where to
begin.)
My company is making software, and part of the release notes are details
about the files included in the release, timestamp, version, checksum, and
so on. This info is gathered in a very manual process:
In Windows Explorer, highlighting the file, ALT+Enter to bring up a
"Properties" window.
In this window, there are tabs, "General","Version", and so on.
What I would like to do, is to write a quick Perl script that will traverse
a directory,
look "inside" each .DLL or what ever type of file, read the metadata
attributes, and write to a file.
I am using ActiveState Perl, 5.6.1 on Windows 2000.
Guess my questions are:
Is there a Perl module that allows me to read this info from the files?
What methods to use?
Examples of code to do this?
Module to compute checksums?
Thanks in advance,
Foz
Frank Foss Guest
-
Mothra #5
Re: Newbie: How to read metadata from a windows DLL
Hi Frank,
CPAN is your friend ;)> Guess my questions are:
> Is there a Perl module that allows me to read this info from the files?
> What methods to use?
> Examples of code to do this?
> Module to compute checksums?
>
checkout
Win32/File/Ver version 0.01
I hope this helps
Mothra
Mothra Guest



Reply With Quote

