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

Re: Scalar reference, pointer to pointer meaning

Thread Previous | Thread Next
From:
Rob Dixon
Date:
December 29, 2002 08:52
Subject:
Re: Scalar reference, pointer to pointer meaning
Message ID:
20021229165248.85190.qmail@onion.perl.org
> 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!)

Cheers,

Rob






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