Hi Volodymyr,
thanks for your reply, but the problem is
not anymore. The last Months i am doing
lots of C# and the good part is as long as you
work strictly with .NET Datatypes you will have
no problem with sizes. You do a single build,
its a so called architecture independent assembly
and it works on 32 and 64 as well. Sure you have
to declare and map the structures and code from
native code very carefully,...but i did it now,...and it
works just fine, no border and boundary violation
and memory corruption so far,...;-)
Have nice day,...
Regards
Kerem
--
--
-----------------------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
Latest Project:
http://www.pro-it-education.de/software/deviceremover
Latest Open-Source Projects:
http://entwicklung.junetz.de
-----------------------
"This reply is provided as is, without warranty express or implied."
Newsbeitrag So if you are going to read only resources from PE files be ready to
test your code on x64 binaries as well, as the structures are different
(different size). Good luck
--
Volodymyr M. Shcherbyna, blog:
http://www.shcherbyna.com/
(This posting is provided "AS IS" with no warranties, and confers no
rights)
Hi Günther,
its only meant to read out compiled resources data
from PE files, there is no need for NTFS-AS, Shell Extemsions,
PropertyBags, etc,...PE-RES Data only,...
Regards
Kerem
--
--
-----------------------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
Latest Project:
http://www.pro-it-education.de/software/deviceremover
Latest Open-Source Projects:
http://entwicklung.junetz.de
-----------------------
"This reply is provided as is, without warranty express or implied."
Hello Kerem!
it is no big match to get the standard Version Information with
the known strings like "ProductName", "ProductVersion", etc, by
using GetFileVersionInfoSize(....), GetFileVersionInfo(...) and
VerQueryValue(...), but how do i get all the non-standard user-
defined strings without knowing their names. I mean is there
any way to enumerate them or place a "pattern/shape" on top
of the Memory-Block that i get e.g. with VerQueryValue(...) or
GetFileVersionInfo(...), because some People use their own
information
like "BuildDate", "CompilerVersion","LicenseAgreement", etc.,
including me! Explorer's Property Dialog shows them, so there must
some way for doing this,...i guess there must be some
Pattern/LinkedList/Structure to do this,...
Be aware of the fact, that there is more than one implementation of
this.
Basically:
1. PE File can provide this in an embeeded resource (this is what you
get from GetFileVersionInfo... functions)
2. If it's no PE-File, and the format supports metadata (like ID3
Tags or EXIF or whatever), a shell-extension kicks in and provide
these to windows explorer (maybe readonly or even writable)
[Property Handlers]
http://msdn.microsoft.com/en-us/library/cc144131(VS.85).aspx
3. If it's no PE-File, and the format doesn't support metadata (like
a .txt file), explorer.exe still allows you to store metadata along
with the file. This is stored in a alternative NTFS Data Stream.
4. e.g. old Office formats may also use COM bound storage methods (is
related to #2), Office 2007 uses the new "Packaging" format (based on
zip), you can use System.IO.Packaging for that.
[Document Metadata Blog]
http://www.document-metadata.com/document-metadata-blog.html
Are you restricted to PE files, or do you want to read various
formats?
If you are not limited to PE-Files maybe it would be an option to use
the Shell API to grap the same properties as explorer.exe.
GP