NAME

Win32::PEFile - Portable Executable File parser

SYNOPSIS

use Win32::PEFile;

my $pe = Win32::PEFile->new (file => 'someFile.exe');

print "someFile.exe has a entry point for EntryPoint1"
    if $pe->getEntryPoint ("EntryPoint1");

my $strings = $pe->getVersionStrings ();
print "someFile.exe version $strings->{'ProductVersion'}\n";

Methods

Win32::PEFile provides the following public methods.

new (%parameters)

Parses a PE file and returns an object used to access the results. The following parameters may be passed:

-file: file name, required

The file name (and path if required) of the PE file to process.

getEntryPoint ($entryPoint)

Returns true if the given entry point exists in the exports table.

$entryPoint: required

Name of the entry point to search for in the Exports table of the PE file.

getVersionStrings ($language)

Returns a hash reference containing the strings in the version resource keyed by string name.

$language: optional

Preferred language for the strings specified as a MicroSoft LangID. US English is preferred by default.

If the preferred language is not available one of the available languages will be used instead.

getFixedVersionValues ($language)

Returns a hash reference containing the fixed version resource values keyed by value name.

$language: optional

Preferred language for the strings specified as a MicroSoft LangID. US English is preferred by default.

If the preferred language is not available one of the available languages will be used instead.

BUGS

Please report any bugs or feature requests to bug-Win32-PEFile at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Win32-PEFile. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

This module is supported by the author through CPAN. The following links may be of assistance:

SEE ALSO

http://kishorekumar.net/pecoff_v8.1.htm

AUTHOR

Peter Jaquiery
CPAN ID: GRANDPA
grandpa@cpan.org

COPYRIGHT AND LICENSE

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.