There are several possible methods of obtaining the path to the application data directory:
-
% APIDATA%
Environment variable -
SHGetFolderPath
withCSIDL_APPDATA
Call a program What is the best way to find a path from within?
Itemprop = "text">
I suggest calling SHGetFolderPath ()
is the most appropriate and portable method; The option, such as reading the environmental variable, or (bad) is trying to remove it from the registry, in the future you are likely to travel.
Explaining why the authorities are pulling such paths from the registry is a bad idea.
Comments
Post a Comment