Windows未公开函数揭密——之三[2]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 technofantasy 的 blog

                              byval nfolder as shspecialfolderids, _
                              pidl as long) as long

public enum shspecialfolderids      '列出所有windows下特殊文件夹的id
    csidl_desktop = &h0
    csidl_internet = &h1
    csidl_programs = &h2
    csidl_controls = &h3
    csidl_printers = &h4
    csidl_personal = &h5
    csidl_favorites = &h6
    csidl_startup = &h7
    csidl_recent = &h8
    csidl_sendto = &h9
    csidl_bitbucket = &ha
    csidl_startmenu = &hb
    csidl_desktopdirectory = &h10
    csidl_drives = &h11
    csidl_network = &h12
    csidl_nethood = &h13
    csidl_fonts = &h14
    csidl_templates = &h15
    csidl_common_startmenu = &h16
    csidl_common_programs = &h17
    csidl_common_startup = &h18
    csidl_common_desktopdirectory = &h19
    csidl_appdata = &h1a
    csidl_printhood = &h1b
    csidl_altstartup = &h1d
    csidl_common_altstartup = &h1e
    csidl_common_favorites = &h1f
    csidl_internet_cache = &h20
    csidl_cookies = &h21
    csidl_history = &h22
end enum

'shgetpathfromidlist函数将一个item转换为文件路径
declare function shgetpathfromidlist lib "shell32.dll" alias "shgetpathfromidlista" _
                              (byval pidl as long, _
                              byval pszpath as string) as long

'shgetfileinfopidl函数获得某个文件对象的信息。
declare function shgetfileinfopidl lib "shell32" alias "shgetfileinfoa" _
                              (byval pidl as long, _
                              byval dwfileattributes as long, _
                              psfib as shfileinfobyte, _
                              byval cbfileinfo as long, _
                              byval uflags as shgfi_flags) as long

public type shfileinfobyte
    hicon as long
    iicon as long
    dwattributes as long
    szdisplayname(1 to max_path) as byte
    sztypename(1 to 80) as byte
end type

declare function shgetfileinfo lib "shell32" alias "shgetfileinfoa" _
                              (byval pszpath as string, _
                              byval dwfileattributes as long, _
                              psfi as shfileinfo, _
                              byval cbfileinfo as long, _

本文关键:Windows未公开函数揭密——之三
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top