jethrow,
maul.eselthanks for explaining vtable thing, guys!
Learning onethanks, man!
this is exactly what i made to retrive selected items in explorer window, but the method for desktop (progman) items will not work properly in case user has enabled option "Hide extensions for known file types", because in this case files with same name can exist and gotten path will be invalid
Is there another way to get selections from desktop?
Btw, with your help, guys, i was able to finish code to the point where CreateViewObject method call required, but which interface's refiid should i use in this method?
DllCall("Shell32\SHGetDesktopFolder","Ptr*",pIShellFolder)
IShellView_refiid := GUID(IID_IShellView, "{000214E3-0000-0000-C000-000000000046}")
vt := NumGet(pIShellFolder + 0)
CreateViewObject := NumGet(vt + 8*A_PtrSize)
DllCall(CreateViewObject,"Ptr", pIShellFolder,"Ptr",0, "Ptr", IShellView_refiid, "Ptr*", pIShellView)
vt := NumGet(pIShellView + 0)
GetItemObject := NumGet(vt + 15*A_PtrSize)
DllCall(GetItemObject,"Ptr", pIShellView,"Uint",SVGIO_SELECTION := 1,"Uptr",[color=red]SomeInterface_refiid[/color],"Ptr*",[color=red]pSomeInterface[/color])
;which IID should i use in this method to get enumeration of selected items?
btw, here is another method to get IShellView pointer:
;~ typedef struct {
;~ UINT cbSize; uint
;~ IShellFolder *pshf; ptr
;~ IShellView *psvOuter; ptr
;~ IShellFolderViewCB *psfvcb; ptr
;~ } SFV_CREATE;
VarSetCapacity(SFV_CREATE,4*A_PtrSize,0)
NumPut(4*A_PtrSize,SFV_CREATE,0,"Uint")
NumPut(pIShellFolder,SFV_CREATE,A_PtrSize,"Uptr")
DllCall("Shell32\SHCreateShellFolderView","Ptr",&SFV_CREATE,"Ptr*",pIShellView)