PDA

View Full Version : Retrieve public folder



Lele
26th July 2007, 09:22
Hi all,

I'd like to retrieve the Public folder on Vista or the corresponding one o Xp, is there a way to do that with Qt? something like QDir::home ()?
Or do I have to resort to Windows API?

thanks in advance


bye

marcel
26th July 2007, 09:48
You must refer to the %PUBLIC% environment variable.
You could use QProcess::systemEnvironment to get a list of env vars.
The you can parse that list and find the public folder.

Also, here is a list of shell folders for Vista and XP:
http://www.digitalinsane.com/archives/2006/10/15/vista_shell_folders/

Regards