Created
October 18, 2014 02:22
-
-
Save lookat23/5f6cc588c6b41e9e10d4 to your computer and use it in GitHub Desktop.
win32 获得系统各种路径
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include | |
main() | |
{ | |
char MyDir[MAX_PATH]; | |
SHGetSpecialFolderPath(NULL,MyDir,CSIDL_APPDATA,0); // CSIDL_APPDATA 获取的是 APPDATA的路径,其它路径可以去看MSDN | |
// 微软推荐用这个API SHGetKnownFolderPath ,但这个API不能向下兼容,到xp就用不了 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment