[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Windows Info Component?

Posted on 2000-03-12
2
Medium Priority
?
126 Views
Last Modified: 2010-04-04
Trying to use SHGetSpecialFolderLocation and have no clue as to how to use it, so I was wondering if anyone new of a (free) non-visual component that would have properties like "DesktopFolder" "FavoritesFolder" "PrintersFolder" ... you get the idea.

Does any such animal exist?

Thanks
James
0
Comment
Question by:shredman
[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 17

Accepted Solution

by:
inthe earned 75 total points
ID: 2610128
Hi
well i show how to use the SHGetSpecialFolderLocation function :

Var
  SFolder :  pItemIDList;
  SpecialPath : Array[0..MAX_PATH] Of Char;
begin
SHGetSpecialFolderLocation(Form1.Handle, CSIDL_STARTUP, SFolder);
SHGetPathFromIDList(SFolder, SpecialPath);
Label1.Caption := StrPas(SpecialPath);

Other folders :
CSIDL_BITBUCKET
CSIDL_CONTROLS
CSIDL_DESKTOP
CSIDL_DESKTOPDIRECTORY
CSIDL_DRIVES
CSIDL_FONTS
CSIDL_NETHOOD
CSIDL_NETWORK
CSIDL_PERSONAL
CSIDL_PRINTERS
CSIDL_PROGRAMS
CSIDL_RECENT
CSIDL_SENDTO
CSIDL_STARTMENU
CSIDL_STARTUP
CSIDL_TEMPLATES

also maybe want:

procedure TForm1.Button1Click(Sender: TObject);
var
lpBuffer: array[0..255] of char;
SysDir: string;
begin
GetWindowsDirectory(lpBuffer, 255);
SysDir := lpBuffer;
Label1.Caption := sysdir;
end;

{also:
GetSystemDirectory() function used same as above. }



0
 

Author Comment

by:shredman
ID: 2611120
Thanks for the insight on how to use this function. I'm not exactly sure why Delphi would require you to use pItemIDList and a character array when something such as a component or a more Delphi friendly function (i.e. one that uses strings), but nevertheless, thank you... the job is done.

James
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

650 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