Solved

Use VAR structure from VerQueryVersion in Pascal

Posted on 1997-11-28
2
250 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

688 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