On 2/1/19 10:02 AM, Timo Paulssen wrote:
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
I am hopeless when it comes to C.
I am still trying to figure out where the information is
located in the exe
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Computers are like air conditioners.
They malfunction when you open windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~