develooper Front page | perl.perl6.users | Postings from February 2019

Re: filever.exe sub?

Thread Previous | Thread Next
From:
Timo Paulssen
Date:
February 1, 2019 18:02
Subject:
Re: filever.exe sub?
Message ID:
946e9efb-2c43-10f3-8604-7eb92d6c3fe0@wakelift.de
On 01/02/2019 01:33, Bruce Gray wrote:
> To call those Windows APIs in Perl 6, you would use NativeCall.
>

Don't forget that Todd wanted to use this on non-windows with not-wine.
NativeCall on linux won't run windows code all by itself.

That said, wine is still a good source for info on how windows things
work internally (though of course they only reverse-engineered how
windows things work, so there's often still differences in the exact
behaviour).

Here's their implementation of the version info code:

https://source.winehq.org/git/wine.git/blob/908903b7f105c62061d62959fd8d8c866095dcdc:/dlls/version/info.c

and the corresponding header file (i think?)

https://source.winehq.org/git/wine.git/blob/c84b7d33dd18651057a80f609e11f809cc7f4bd0:/include/winver.h


Normally I'd just say "good luck and have fun!", but that whole file is
very big and doesn't seem very self-explanatory at all.

I don't have time right now to go through it, but if you want to give
understanding it a try, here's a link to wine's "cross-referenced source
browser" thingie where most keywords are clickable so you can directly
find other header files, or where and how symbols/types that are used in
the code are defined:

https://source.winehq.org/source/dlls/version/version.c

Sorry for not giving a super simple solution. Perhaps there's something
on the net for "PE metadata parser" or "PE file parser" or whatever.

Hope that gets you closer to your goal!
  - Timo

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About