| |
| Getting the windows directory. |
 |
How can I determine where the Windows directory is?
You can make a call to the Windows API function
GetWindowsDirectory().
If you want the system directory, simply call the Windows API function
GetSystemDirectory().
Example:
{$IFNDEF WIN32}
const MAX_PATH = 44;
{$ENDIF}
procedure TForm .Button Click(Sender: TObject);
var
a : Array[0..MAX_PATH] of char;
begin
GetWindowsDirectory(a, sizeof(a));
ShowMessage(StrPas(a));
GetSystemDirectory(a, sizeof(a));
ShowMessage(StrPas(a));
end;
|
|
| Hits/month |
2,500,000+ |
Downloads (Since May 2000) |
7,393,709 |
| Total Files |
6,023 |
| Forum msgs |
7,670 |
| Articles/FAQs |
70+/900+ |
Top Selling Software at Amazon
|