Windows Directory
-
Look up SHGetFolderPath in the documentation and use the flag 'CSIDL_WINDOWS', this will get you the path to the windows folder (typically c:\windows). Always use SHGetFolderPath for special folders like My Documents, Program Files and so on. It's a bit of an ugly function so I'd wrap it in something a bit cleaner that returns a string.
Dave Kerr codechamber@hotmail.com http://www.codechamber.com
-
See
GetWindowsDirectory
_**
**_
WhiteSky
-
Look up SHGetFolderPath in the documentation and use the flag 'CSIDL_WINDOWS', this will get you the path to the windows folder (typically c:\windows). Always use SHGetFolderPath for special folders like My Documents, Program Files and so on. It's a bit of an ugly function so I'd wrap it in something a bit cleaner that returns a string.
Dave Kerr codechamber@hotmail.com http://www.codechamber.com
CSIDL_WINDOWS
was only recently added to theCSIDL_*
list. UseGetWindowsDirectory()
to have your code work on all versions of the OS--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ