Skip to content

Reply To: Upload your program for jan 2005 contest here

#189950
g0df4th3r
Member

no that has nothing to do with my code sorry its moor like

Dim hProcess As Long, lptvi As Long, tvi As TVITEM, lpBuffer As String * 1024
GetWindowThreadProcessId hTV, hProcess
hProcess = OpenProcess(PROCESS_VM_OPERATION Or PROCESS_VM_READ Or PROCESS_VM_WRITE Or PROCESS_QUERY_INFORMATION, 0, hProcess)
lptvi = VirtualAllocEx(hProcess, ByVal 0&, Len(tvi), MEM_COMMIT, PAGE_READWRITE)
tvi.hItem = hItem
tvi.cchTextMax = 1024
tvi.pszText = VirtualAllocEx(hProcess, ByVal 0&, 1024, MEM_COMMIT, PAGE_READWRITE)
tvi.mask = TVIF_TEXT
WriteProcessMemory hProcess, ByVal lptvi, tvi, Len(tvi), ByVal 0&
SendMessage hTV, TVM_GETITEMA, 0, ByVal lptvi
ReadProcessMemory hProcess, ByVal tvi.pszText, ByVal lpBuffer, Len(lpBuffer), ByVal 0&
VirtualFreeEx hProcess, ByVal lptvi, 0, MEM_RELEASE
VirtualFreeEx hProcess, ByVal tvi.pszText, 0, MEM_RELEASE
CloseHandle hProcess
GetItemText = Left$(lpBuffer, InStr(lpBuffer, vbNullChar) – 1)