Hello
I want to be able to select which item is selected in another program's list view(I don't have access to its code). Actually, it is an SysListView32, which I assume is the same. I already have the following code, which unfortunely despite compiling, seems to do nothing (although SendMessage() returns 1).
process=OpenProcess(PROCESS_VM_OPERATION|PROCESS_VM_READ|PROCESS_VM_WRITE|PROCESS_QUERY_INFORMATION, FALSE, 0xD14);
_lvi=(LVITEM*)VirtualAllocEx(process, NULL, sizeof(LVITEM), MEM_COMMIT, PAGE_READWRITE);
lvi.state = LVIS_SELECTED | LVIS_FOCUSED;
lvi.stateMask = LVIS_SELECTED | LVIS_FOCUSED;
WriteProcessMemory(process, _lvi, &lvi, sizeof(LVITEM), NULL);
int abc = ::SendMessage((HWND)0x00050D30, LVM_SETITEMSTATE, (WPARAM)2, (LPARAM)_lvi);
VirtualFreeEx(process, _lvi, 0, MEM_RELEASE);