Solved

Use VAR structure from VerQueryVersion in Pascal

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

708 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

17 Experts available now in Live!

Get 1:1 Help Now