Solved

Use VAR structure from VerQueryVersion in Pascal

Posted on 1997-11-28
2
247 Views
Last Modified: 2010-04-04
VerQueryValue from Win32Api can return a pointer to a structure called VAR.

Var {
    WORD  wLength;
    WORD  wValueLength;
    WORD  wType;
    WCHAR szKey[];
    WORD  Padding[];
    DWORD Value[];
};

In the open array Value[] Windows returns the supported Languages and CodePages of the file.

How can I get this information under Delphi 2.01? Or how can I rebuild this structure in Pascal.
0
Comment
Question by:fhaehni
2 Comments
 
LVL 5

Accepted Solution

by:
julio011597 earned 50 total points
ID: 1352262
Value is an array of DWORD's.

I've no access to Delphi here, but this should be how to go:
--//--
var
  P: Pointer;
  v: DWORD;
begin
  P := VarQueryValue(...);
  v := VAR(P)^.Value[0]; // now v holds first element of Value
end;
--//--

HTH.
0
 

Author Comment

by:fhaehni
ID: 1352263
Thanks a lot. It wasn't exactly what I wanted but this answer opened my eyes. So it's quite useful for me. Thanks again.

Frank
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question