Well, it seems to be working okay:
VB Code:
'get the handle to the List View control
hwndShellDll = FindWindowEx(GetParent(hwnd), 0&, "SHELLDLL_DefView" & vbNullChar, vbNullString)
If hwndShellDll <> 0 Then
hwndListView = FindWindowEx(hwndShellDll, 0&, "SysListView32" & vbNullChar, vbNullString)
lngCount = SendMessage(hwndListView, LVM_GETITEMCOUNT, ByVal 0&, ByVal 0&)