Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Getting Strings for Win/WinSys Directory

Posted on 1998-01-26
1
Medium Priority
?
178 Views
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);
var
lptstr: pchar;
begin
 getwindowsdirectory(lptstr,MAX_PATH);
end;
0
Comment
Question by:d4jaj1
1 Comment
 
LVL 5

Accepted Solution

by:
ronit051397 earned 40 total points
ID: 1357609
procedure TForm1.Button1Click(Sender: TObject);
var A: PChar;
begin
  GetMem(A,MAX_PATH+1);                                     GetWindowsDirectory(A,MAX_PATH+1);
  showmessage(StrPas(A));
  FreeMem(A,MAX_PATH+1);
end;
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

926 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