Solved

Use VAR structure from VerQueryVersion in Pascal

Posted on 1997-11-28
2
243 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
indy Tmemory stream non latin charcter issue 2 97
Delphi: how to send PJL commands to printer 3 88
code issue 8 97
LAN or WAN ? 11 81
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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

932 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now