develooper Front page | perl.beginners | Postings from December 2002

Re: Scalar reference, pointer to pointer meaning

Thread Previous | Thread Next
Rob Dixon
December 29, 2002 08:52
Re: Scalar reference, pointer to pointer meaning
Message ID:
> Using VerQueryValue for file version information on Windows
> > What I expected to find in $lplpBuffer is instead being
> > written to an unused part of the full buffer ($lpFullBuffer).

As far as I know, Windows never hands back a newly-allocated data buffer to
you. The idea is that you call GetFileVersionInfoSize() to see how big /all/
of the version information is, allocate yourself a buffer (with malloc() or
similar in C) and call GetFileVersionInfo() to get all of the information
locally, and then call VerQueryValue() to slice up what you have into useful
parts. VerQueryValue() will return the address and length of a section
within your version info buffer.

> Got it.

Well done Gary. One thing: 'use strict' (but then you knew that!)



Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About