Thanks to those who gave me a feedback.
I am still working on it, and i am learning several "under the hood" things about the desktop.
Example:
LOCAL hListView, dwProcessId, hProcess, dwSize, lpData AS DWORD
LOCAL nItemCount AS LONG
hListView = FindWindow("Progman", "Program Manager")
hListView = FindWindowEx(hListView, 0, "SHELLDLL_DefView", "")
hListView = FindWindowEx(hListView, 0, "SysListView32", "FolderView")
CALL GetWindowThreadProcessId(hListView, dwProcessId)
hProcess = OpenProcess(%PROCESS_VM_OPERATION OR %PROCESS_VM_READ OR %PROCESS_VM_WRITE, %FALSE, dwProcessId)
IF hProcess THEN
'// Compute the size of our reserved memory buffer
dwSize = sizeof(POINTAPI) + sizeof(LVITEM) + %MAX_PATH * 2
lpData = VirtualAllocEx(hProcess, BYVAL %NULL, dwSize, %MEM_COMMIT, %PAGE_READWRITE)
IF lpData THEN
'// Setup pointers
LOCAL lpPosition, lpItem, lpText AS LONG
lpPosition = lpData
lpItem = lpData + sizeof(POINTAPI)
lpText = lpData + sizeof(POINTAPI) + sizeof(LVITEM)
DIM lvi AS LVITEM
LOCAL szText AS ASCIIZ * (%MAX_PATH * 2) ' Allow room for unicode
LOCAL i AS LONG
nItemCount = SendMessage(hListView, %LVM_GETITEMCOUNT, 0, 0)
FOR i = 0 TO nItemCount - 1
'// Init LVITEM structure and copy it to our reserved memory buffer
lvi.mask = %LVIF_TEXT
lvi.iItem = i
lvi.iSubItem = 0
lvi.pszText = lpText
lvi.cchTextMax = %MAX_PATH * 2
CALL WriteProcessMemory(hProcess, lpItem, lvi, sizeof(LVITEM), 0)
'// Get text label and x,y location
CALL SendMessage(hListView, %LVM_GETITEMTEXT, i, lpItem)
CALL SendMessage(hListView, %LVM_GETITEMPOSITION, i, lpPosition)
'// Copy from process memory to local variables
szText = ""
CALL ReadProcessMemory(hProcess, lpText, szText, %MAX_PATH * 2, 0)
LOCAL p AS POINTAPI
CALL ReadProcessMemory(hProcess, lpPosition, p, SIZEOF(POINTAPI), 0)
Af$ += str$(p.X)+str$(p.Y) + " " + szText + $CR
NEXT
'// Freeup memory
CALL VirtualFreeEx(hProcess, lpData, 0, %MEM_RELEASE)
END IF
'// Close process
CALL CloseHandle(hProcess)
END IF
msgbox Af$