| 发表于:2007-06-17 22:43:361楼 得分:0 |
1.对于special folder,比较容易。直接用call shgetspecialfolderlocation(0, csidl, lpidl)。 2.对于一般folder,用ilcreatefrompathw。 private declare function ilcreatefrompathw lib "shell32 " (byval pwszpath as long) as long #if win32_ie > = &h500 then private declare sub ilfree lib "shell32 " (byval pidl as long) #esle private declare sub ilfree lib "shell32 " alias "#155 " (byval pidl as long) #end if public function getpidlfrompath(hwnd as long, spath as string) as long getpidlfrompath = ilcreatefrompathw(strptr(spath)) end function 调用: pidl = getpidlfrompath(me.hwnd, spath) 。。。 ilfree pidl pidl = 0 不知我理解对不对。敬请参考。 | | |
|