Getting Strings for Win/WinSys Directory

Posted on 1998-01-26
Last Modified: 2010-04-04
Can anyone tell me how to return teh strings for the GetWindowsDirectory and GetWindowsSysDir.  I'm looking for code.  Here's teh code I already have (it causes an access violation)

procedure TForm2.Button3Click(Sender: TObject);
lptstr: pchar;
Question by:d4jaj1
1 Comment

Accepted Solution

ronit051397 earned 10 total points
ID: 1357609
procedure TForm1.Button1Click(Sender: TObject);
var A: PChar;
  GetMem(A,MAX_PATH+1);                                     GetWindowsDirectory(A,MAX_PATH+1);

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Title # Comments Views Activity
Virtuailstring tree compare node issue 14 127
Magic Software info 18 139
Multiple image collision 13 81
how to resize animated Gif image in delphi ? 1 35
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 I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

820 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