-
关于Environ函数
Feb122009我们经常接触的获取路径的API有GetWindowsDirectory()、GetSystemDirectory(),但是还有一个API叫SHGetFolderPath很少有人用,它可获取的系统路径更多,例如:
Option ExplicitPrivate Const MAX_PATH = 260
‘Return Values
Private Const S_FALSE = &H1
Private Const E_INVALIDARG = &H80070057‘Flags
Private Const SHGFP_TYPE_CURRENT = 0 ‘ current value for user, verify it exists
Private Const SHGFP_TYPE_DEFAULT = 1 ‘ default value, may not exist‘nFolder Value
阅读全文
Private Const CSIDL_DESKTOP = &H0 ‘
Private Const CSIDL_INTERNET = &H1 ‘ Internet Explorer (icon on desktop)
Private Const CSIDL_PROGRAMS = &H2 ‘ Start Menu\Programs
Private Const CSIDL_CONTROLS = &H3 ‘ My Computer\Control Panel
Private Const CSIDL_PRINTERS = &H4 ‘ My Computer\Printers
Private Const CSIDL_PERSONAL = &H5 ‘ My Documents
Private Const CSIDL_FAVORITES = &H6 ‘ \Favorites
Private Const CSIDL_STARTUP = &H7 ‘ Start Menu\Programs\Startup
Private Const CSIDL_RECENT = &H8 ‘ \Recent
Private Const CSIDL_SENDTO = &H9 ‘ \SendTo抢沙发
当前位置: 首页 >
Environ