|
Introduction
I was recently trying to steal strings from another program's listview control. You need to pass a pointer so it knows where to put the string. Normally this wouldn't be a problem, but because Windows uses virtual memory pointers are not valid across programs.
Virtual memory is how Windows deals out memory to all it's programs. It makes programs think they have 2 Gb of memory to use. It also protects programs from using each other's memory so if one program crashes it doesn't take down the whole system with it.
So after coding a fair bit, I realized my pointers were all invalid and it wouldn't work. A few hours of digging through MSDN brought me to the functions VirtualAllocEx(), VirtualFreeEx(), WriteProcessMemory() and ReadProcessMemory(). Armed with this new information, I set out to modify my code. Here is what I had so far: #define WIN32_LEAN_AND_MEAN
#include <stdio.h>
#include <windows.h>
#include <commctrl.h>
int main(void) {
HWND hwnd=FindWindow(NULL, "Stealing Program's Memory: ListView");
HWND listview=FindWindowEx(hwnd, NULL, "SysListView32", NULL);
int count=(int)SendMessage(listview, LVM_GETITEMCOUNT, 0, 0);
int i;
char item[512], subitem[512];
LVITEM lvi;
lvi.cchTextMax=512;
for(i=0; i<count; i++) {
lvi.iSubItem=0;
lvi.pszText=item;
SendMessage(listview, LVM_GETITEMTEXT, (WPARAM)i, (LPARAM)&lvi);
lvi.iSubItem=1;
lvi.pszText=subitem;
SendMessage(listview, LVM_GETITEMTEXT, (WPARAM)i, (LPARAM)&lvi);
printf("%s - %s\n", item, subitem);
}
return 0;
}
As I said before, this won't work. The pointers to lvi, item, and subitem all get screwed when they go across process. The solution? Use WriteProcessMemory() and ReadProcessMemory() to use the other programs memory, perform LVM_GETITEMTEXT on it, and read it back. Hackish yes, but then again reading items from another program's listview control is one giant hack.
First, we get the process of the listview like this: unsigned long pid;
HANDLE process;
GetWindowThreadProcessId(listview, &pid);
process=OpenProcess(PROCESS_VM_OPERATION|PROCESS_VM_READ|
PROCESS_VM_WRITE|PROCESS_QUERY_INFORMATION, FALSE, pid);
Next We create three pointers, LVITEM *_lvi, char *_item, and char *_subitem and allocate them in the other program's virtual memory space with VirtualAllocEx(): LVITEM *_lvi=(LVITEM*)VirtualAllocEx(process, NULL, sizeof(LVITEM),
MEM_COMMIT, PAGE_READWRITE);
char *_item=(char*)VirtualAllocEx(process, NULL, 512, MEM_COMMIT,
PAGE_READWRITE);
char *_subitem=(char*)VirtualAllocEx(process, NULL, 512, MEM_COMMIT,
PAGE_READWRITE);
Now we point lvi.pszText to _item, and copy it's memory to _lvi using WriteMemoryProcess(): lvi.pszText=_item;
WriteProcessMemory(process, _lvi, &lvi, sizeof(LVITEM), NULL);
Now that we have an LVITEM pointer that is valid in the other programs virtual memory, we can shoot off LVM_GETITEMTEXT to listview and copy _item's text into item so we can read it in our program: SendMessage(hwnd, LVM_GETITEMTEXT, (WPARAM)i, (LPARAM)_lvi);
ReadProcessMemory(process, _item, item, max, NULL);
Repeat that for subitem, then free the memory we used in the other program's memory: VirtualFreeEx(process, _lvi, 0, MEM_RELEASE);
VirtualFreeEx(process, _item, 0, MEM_RELEASE);
VirtualFreeEx(process, _subitem, 0, MEM_RELEASE);
Yay, all done. In case that didn't make too much sense to you, here is our new code, all fixed up: #define WIN32_LEAN_AND_MEAN
#include <stdio.h>
#include <windows.h>
#include <commctrl.h>
int main(void) {
HWND hwnd=FindWindow(NULL, "Stealing Program's Memory: ListView");
HWND listview=FindWindowEx(hwnd, NULL, "SysListView32", NULL);
int count=(int)SendMessage(listview, LVM_GETITEMCOUNT, 0, 0);
int i;
LVITEM lvi, *_lvi;
char item[512], subitem[512];
char *_item, *_subitem;
unsigned long pid;
HANDLE process;
GetWindowThreadProcessId(listview, &pid);
process=OpenProcess(PROCESS_VM_OPERATION|PROCESS_VM_READ|
PROCESS_VM_WRITE|PROCESS_QUERY_INFORMATION, FALSE, pid);
_lvi=(LVITEM*)VirtualAllocEx(process, NULL, sizeof(LVITEM),
MEM_COMMIT, PAGE_READWRITE);
_item=(char*)VirtualAllocEx(process, NULL, 512, MEM_COMMIT,
PAGE_READWRITE);
_subitem=(char*)VirtualAllocEx(process, NULL, 512, MEM_COMMIT,
PAGE_READWRITE);
lvi.cchTextMax=512;
for(i=0; i<count; i++) {
lvi.iSubItem=0;
lvi.pszText=_item;
WriteProcessMemory(process, _lvi, &lvi, sizeof(LVITEM), NULL);
SendMessage(listview, LVM_GETITEMTEXT, (WPARAM)i, (LPARAM)_lvi);
lvi.iSubItem=1;
lvi.pszText=_subitem;
WriteProcessMemory(process, _lvi, &lvi, sizeof(LVITEM), NULL);
SendMessage(listview, LVM_GETITEMTEXT, (WPARAM)i, (LPARAM)_lvi);
ReadProcessMemory(process, _item, item, 512, NULL);
ReadProcessMemory(process, _subitem, subitem, 512, NULL);
printf("%s - %s\n", item, subitem);
}
VirtualFreeEx(process, _lvi, 0, MEM_RELEASE);
VirtualFreeEx(process, _item, 0, MEM_RELEASE);
VirtualFreeEx(process, _subitem, 0, MEM_RELEASE);
return 0;
}
If you're looking to use a program's memory for another reason, or have had a similar problem to mine, adapting this should be fairly easy.
This article was originally written for int64.org
| You must Sign In to use this message board. |
|
| | Msgs 1 to 25 of 43 (Total in Forum: 43) (Refresh) | FirstPrevNext |
|
|
 |
|
|
I Tried that with vista 64 (32 bit Compiler) but SendMessage(LVM_GETITEMTEXT...) returns empty item label strings. Does anyone havve a solution for that?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Just found out how to solve that: The desktop listviews address space in Vista 64 of course is in 64-bit address space and the 32-bit app uses 32-bit pointers when reading and writing the processes foreign memory. Compiling the app with a 64-bit compiler fixes that problem
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I don't know about all compilers (I don't know if this code would work differently on another compiler) but on Microsoft Visual VirtualAllocEx initializes the entire commited range with 0s.
-Cedar
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Is it possible to get selected text? E.g. if user select some text from Word, Notepad, ... is it possible to retrieve that text? Loop trough top windows and see if there is some text that is selected and copy it for further analysis? What message to send? Thanks for help!
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I have done . i was happy . my send message(a,b,n,&lvitem) was doing very fine but later when i uploaded this to final destination a i tried i got this error
Failled to alocate memmory in remote process
i am shoure i have alocated vmamory in and programe has accress to this new memory but i am still having this Failled to alocate memmory in remote process bug may any body help me in this Thank You  _______________
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
FWIW, here is a clever utility that copies the text of another process's controls to the clipboard. The controls that are supported are Edit (including obscured password edits), Static, Headers, Listview, ComboBox and ListBox. Source code (GPL'd) is included:
"Control Content Saver" by Jacquelin Potier at http://jacquelin.potier.free.fr/controlcontentsaver/[^]
Jeffrey Richter, in his Win32 Q&A column from September 1997, explains the apparent contradiction of why, with some messages (like WM_GETTTEXT and LB_GETTEXT and EM_GETLINE), it's possible to copy data from another process even though you're using a pointer to memory in the local process, whereas for other messages (like LVM_GETITEMTEXT) it's not. See http://www.microsoft.com/msj/0997/win320997.aspx[^]. His solution for list view controls is similar to that proposed in this article.
Mike
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Hi. I'm trying to convert to C# but I got a null buffer (all items are \0).
Please, can someone help me?
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Runtime.InteropServices;
namespace WindowsApplication3 { public partial class Form1 : Form { public Form1() { InitializeComponent(); }
private void Form1_Load(object sender, EventArgs e) { IntPtr mainWindowHwnd; IntPtr lvwHwnd = (IntPtr)0;
try { mainWindowHwnd = FindWindow(null, "Stealing Program's memory: ListView"); lvwHwnd = FindWindowEx(mainWindowHwnd, IntPtr.Zero, "SysListView32", IntPtr.Zero);
if (lvwHwnd == (IntPtr)0) throw new Win32Exception(); } catch(Exception ex) { MessageBox.Show("[" + Marshal.GetLastWin32Error().ToString() + "] - Não foi possível obter o handle do controle filho.\n\n" + ex.ToString(), "Atenção", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; }
int lvwItem = 0;
IntPtr pid = (IntPtr)0; GetWindowThreadProcessId(lvwHwnd, ref pid);
IntPtr _lvi; IntPtr _subitem = IntPtr.Zero;
IntPtr process = OpenProcess(PROCESS_VM_OPERATION | PROCESS_VM_READ | PROCESS_VM_WRITE | PROCESS_QUERY_INFORMATION, false, pid.ToInt32());
LVITEM lvi = new LVITEM();
//process = (IntPtr)(process.ToInt32() - 1); _lvi = VirtualAllocEx(process, IntPtr.Zero, Marshal.SizeOf(typeof(LVITEM)), MEM_COMMIT, PAGE_READWRITE); _subitem = VirtualAllocEx(process, IntPtr.Zero, 512, MEM_COMMIT, PAGE_READWRITE);
if(_lvi == IntPtr.Zero) throw new SystemException("Failed to allocate memory in remote process");
bool bsuccess;
lvi.cchTextMax = 512; lvi.iSubItem = 1; lvi.pszText = _subitem; bsuccess = WriteProcessMemory(process, _lvi, ref lvi, Marshal.SizeOf(typeof(LVITEM)), IntPtr.Zero); SendMessage(lvwHwnd, LVM_GETITEMTEXT, lvwItem, _lvi);
IntPtr lpBuffer; lpBuffer = Marshal.AllocHGlobal(512); string sRet; IntPtr bytesReaded; byte[] buffer = new byte[512]; ReadProcessMemory(process, _subitem, buffer, 512, out bytesReaded); //sRet = Marshal.PtrToStringAnsi(lpBuffer, 512);
VirtualFreeEx(process, _lvi, 0, MEM_RELEASE); VirtualFreeEx(process, _subitem, 0, MEM_RELEASE); }
[DllImport("user32.dll", CharSet = System.Runtime.InteropServices.CharSet.Auto)] public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
[DllImport("user32.dll", CharSet = CharSet.Auto)] public static extern IntPtr FindWindowEx(IntPtr parent /*HWND*/, IntPtr next /*HWND*/, string sClassName, IntPtr sWindowTitle);
//''''''''''''''''''''''''''''''''''''''''''''''' //' Used by the OpenProcess API call
private const long STANDARD_RIGHTS_REQUIRED = 0xF0000; private const long SYNCHRONIZE = 0x100000;
private const int PROCESS_TERMINATE = 0x1; private const int PROCESS_CREATE_THREAD = 0x2; private const int PROCESS_SET_SESSIONID = 0x4; private const int PROCESS_VM_OPERATION = 0x8; private const int PROCESS_VM_READ = 0x10; private const int PROCESS_VM_WRITE = 0x20; private const long PROCESS_DUP_HANDLE = 0x40; private const long PROCESS_CREATE_PROCESS = 0x80; private const long PROCESS_SET_QUOTA = 0x100; private const long PROCESS_SET_INFORMATION = 0x200; private const int PROCESS_QUERY_INFORMATION = 0x400; private const long PROCESS_SUSPEND_RESUME = 0x800; private const long PROCESS_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0xFFF;
[DllImport("kernel32")] public static extern IntPtr OpenProcess(int dwDesiredAccess, bool bInheritHandle, int dwProcessID); //'''''''''''''''''''''''''''''''''''''''''''''''
const uint MEM_COMMIT = 0x1000; const uint MEM_RELEASE = 0x8000; const uint PAGE_READWRITE = 0x4;
[DllImport("kernel32")] static extern IntPtr VirtualAllocEx(IntPtr hProcess, IntPtr lpAddress, int dwSize, uint flAllocationType, uint flProtect);
[DllImport("kernel32")] static extern bool WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, ref LVITEM buffer, int dwSize, IntPtr lpNumberOfBytesWritten);
//Private Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal hWnd As IntPtr, ByVal msg As Int32, ByVal wParam As IntPtr, ByRef lParam As IntPtr) As Boolean [DllImport("user32.dll")] static extern bool SendMessage(IntPtr hWnd, int msg, int wParam, IntPtr lParam);
private const int LVM_FIRST = 0x1000; private const long LVM_GETSELECTEDCOUNT = (LVM_FIRST + 50); private const long LVM_GETITEMSTATE = (LVM_FIRST + 44); public const int LVM_GETITEMTEXT = (LVM_FIRST + 45); public const long LVM_GETITEMCOUNT = LVM_FIRST + 4; private const long LVIF_TEXT = 0x1;
//'Public Const LVM_GETITEMA = (LVM_FIRST + 5) //'Public Const LVM_GETITEMW = (LVM_FIRST + 75) public const long LVM_GETITEM = (LVM_FIRST + 5);
[StructLayout(LayoutKind.Sequential)] private struct LVITEM { public Int16 mask; public Int16 iItem; public Int16 iSubItem; public Int16 state; public Int16 stateMask; public IntPtr pszText; public Int16 cchTextMax; public Int16 iImage; }
[DllImport("kernel32.dll")] public static extern bool ReadProcessMemory( IntPtr hProcess, IntPtr lpBaseAddress, //[In, Out] byte[] buffer, IntPtr buffer, UInt32 size, out IntPtr lpNumberOfBytesRead );
[DllImport("kernel32.dll")] public static extern Int32 ReadProcessMemory( IntPtr hProcess, IntPtr lpBaseAddress, [In, Out] byte[] buffer, UInt32 size, out IntPtr lpNumberOfBytesRead );
[DllImport("kernel32")] static extern bool VirtualFreeEx(IntPtr hProcess, IntPtr lpAddress, int dwSize, uint dwFreeType);
[DllImport("user32")] private static extern IntPtr GetWindowThreadProcessId(IntPtr hWnd, ref IntPtr lpdwProcessId); } }
|
| Sign In·View Thread·PermaLink | 3.17/5 (5 votes) |
|
|
|
 |
|
|
Hallo!
Only the declaration of LVITEM ist wrong!
[StructLayout(LayoutKind.Sequential)] private struct LVITEM { public int mask; public int iItem; public int iSubItem; public int state; public int stateMask; public IntPtr pszText; public int cchTextMax; public int iImage; internal int lParam; internal int iIndent; }
Best Regards - Kalle
|
| Sign In·View Thread·PermaLink | 2.29/5 (3 votes) |
|
|
|
 |
|
|
Here's a cleaner version in a function format. The corresponding C code is in comments. You'll have to cut and paste the constants, dll imports, etc from Marco's code above.
public string[,] ReadListView(IntPtr ParentHWND, IntPtr ListViewHWND) { // max 200 items string[,] ReturnString = new string[200, 2]; int ReturnStringIndex = 0;
//HWND hwnd = FindWindow(NULL, "Stealing Program's Memory: ListView"); //HWND listview = FindWindowEx(hwnd, NULL, "SysListView32", NULL);
//int count = (int)SendMessage(listview, LVM_GETITEMCOUNT, 0, 0); //int i;
int ListViewItemCount = (int)SendMessage(ListViewHWND, LVM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); // get max 200 items if (ListViewItemCount > 200) ListViewItemCount = 199;
//LVITEM lvi, *_lvi; //char item[512], subitem[512]; //char *_item, *_subitem; //unsigned long pid; //HANDLE process;
LVITEM ListViewItem = new LVITEM(); IntPtr ListViewItemPointer = IntPtr.Zero; byte[] ListViewItemBuffer = new byte[512]; byte[] ListViewSubItemBuffer = new byte[512]; IntPtr ListViewPointer_item = IntPtr.Zero; IntPtr ListViewPointer_subitem = IntPtr.Zero; uint ProcessID=0; IntPtr ListViewProcessPointer = IntPtr.Zero;
//GetWindowThreadProcessId(listview, &pid); //process = OpenProcess(PROCESS_VM_OPERATION | PROCESS_VM_READ | PROCESS_VM_WRITE | PROCESS_QUERY_INFORMATION, FALSE, pid);
GetWindowThreadProcessId(ListViewHWND, out ProcessID); ListViewProcessPointer = OpenProcess(PROCESS_VM_OPERATION | PROCESS_VM_READ | PROCESS_VM_WRITE | PROCESS_QUERY_INFORMATION, false, ProcessID);
//_lvi = (LVITEM*)VirtualAllocEx(process, NULL, sizeof(LVITEM), MEM_COMMIT, PAGE_READWRITE); //_item = (char*)VirtualAllocEx(process, NULL, 512, MEM_COMMIT, PAGE_READWRITE); //_subitem = (char*)VirtualAllocEx(process, NULL, 512, MEM_COMMIT, PAGE_READWRITE); //lvi.cchTextMax = 512;
ListViewItemPointer = VirtualAllocEx(ListViewProcessPointer, IntPtr.Zero, (uint)Marshal.SizeOf(typeof(LVITEM)), MEM_COMMIT, PAGE_READWRITE); ListViewPointer_item = VirtualAllocEx(ListViewProcessPointer, IntPtr.Zero, 512, MEM_COMMIT, PAGE_READWRITE); ListViewPointer_subitem = VirtualAllocEx(ListViewProcessPointer, IntPtr.Zero, 512, MEM_COMMIT, PAGE_READWRITE);
ListViewItem.cchTextMax = 512;
//for(i=0; i //{
for (int index = 0; index < ListViewItemCount; index++) {
//lvi.iSubItem=0; //lvi.pszText=_item; //WriteProcessMemory(process, _lvi, &lvi, sizeof(LVITEM), NULL); //SendMessage(listview, LVM_GETITEMTEXT, (WPARAM)i, (LPARAM)_lvi);
ListViewItem.SubItem = 0; ListViewItem.pszText = ListViewPointer_item; WriteProcessMemory(ListViewProcessPointer, ListViewItemPointer, ref ListViewItem, Marshal.SizeOf(typeof(LVITEM)), IntPtr.Zero); SendMessage(ListViewHWND, LVM_GETITEMTEXT, (IntPtr)index, ListViewItemPointer);
//lvi.iSubItem = 1; //lvi.pszText = _subitem; //WriteProcessMemory(process, _lvi, &lvi, sizeof(LVITEM), NULL); //SendMessage(listview, LVM_GETITEMTEXT, (WPARAM)i, (LPARAM)_lvi);
ListViewItem.SubItem = 1; ListViewItem.pszText = ListViewPointer_subitem; WriteProcessMemory(ListViewProcessPointer, ListViewItemPointer, ref ListViewItem, Marshal.SizeOf(typeof(LVITEM)), IntPtr.Zero); SendMessage(ListViewHWND, LVM_GETITEMTEXT, (IntPtr)index, ListViewItemPointer);
//ReadProcessMemory(process, _item, item, 512, NULL); //ReadProcessMemory(process, _subitem, subitem, 512, NULL); IntPtr bytesReaded; ReadProcessMemory(ListViewProcessPointer, ListViewPointer_item, ListViewItemBuffer, 512, out bytesReaded); ReadProcessMemory(ListViewProcessPointer, ListViewPointer_subitem, ListViewSubItemBuffer, 512, out bytesReaded);
ReturnString[ReturnStringIndex, 0] = Encoding.ASCII.GetString(ListViewItemBuffer); ReturnString[ReturnStringIndex, 1] = Encoding.ASCII.GetString(ListViewSubItemBuffer); ReturnStringIndex++; }
//VirtualFreeEx(process, _lvi, 0, MEM_RELEASE); //VirtualFreeEx(process, _item, 0, MEM_RELEASE); //VirtualFreeEx(process, _subitem, 0, MEM_RELEASE);
VirtualFreeEx(ListViewProcessPointer, ListViewItemPointer, (UIntPtr)0, MEM_RELEASE); VirtualFreeEx(ListViewProcessPointer, ListViewPointer_item, (UIntPtr)0, MEM_RELEASE); VirtualFreeEx(ListViewProcessPointer, ListViewPointer_subitem, (UIntPtr)0, MEM_RELEASE);
return ReturnString;
}
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
This save my time of searching solution. Before found this article I nearly go to the hooking that I'm not fully understand. This article explain clearly and easy to follow.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I use the code and change it a bit. The code below retrieves text on statusbar "msctls_statusbar32". I use SB_GETTEXT to send message and retrieves text. But on statusbar "StatusBar20WndClass", i am getting null string. I need help on this. Thank you for your suggestions.
Status Bar in a Dialog - Nish for CP - http://www.codeproject.com/statusbar/dlgstatbar01.asp[]
Code:
//HWND hwnd=FindWindow(NULL, "Status Bar in a Dialog - Nish for CP"); //HWND hStatusBar=FindWindowEx(hwnd, NULL, "msctls_statusbar32", NULL); HWND hwnd=FindWindow(NULL, "TEST"); HWND hStatusBar=FindWindowEx(hwnd, NULL, "StatusBar20WndClass", NULL); unsigned long pid; HANDLE process; char *_item; char item[512]; GetWindowThreadProcessId(hStatusBar, &pid); process=OpenProcess(PROCESS_VM_OPERATION|PROCESS_VM_READ|PROCESS_QUERY_INFORMATION, FALSE, pid); _item=(char*)VirtualAllocEx(process, NULL, 512, MEM_COMMIT, PAGE_READWRITE); SendMessage(hStatusBar, SB_GETTEXT, (WPARAM)0, (LPARAM)_item); ReadProcessMemory(process, _item, &item, 512, NULL); printf("%s",item); VirtualFreeEx(process, _item, 0, MEM_RELEASE); return 0;
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
Hello doenoe,
I had to adress this problem with the VB StatusBar (StatusBar20WndClass) a long time ago, too. Have you achieved to get this working?
I found out that it works if the statusbar is in its simple mode. But if it is in the "normal", e.g. multiple panel mode it returns an empty string. Sending SB_GETTEXTLENGTH gives SBT_OWNERDRAW as result, e.g. the VB control draws the text itself. The MSDN says that in this case sending SB_GETTEXT gives a 32bit number associated with the string. This seems to be correct, e.g. I get this number. Do you have any idea how to get this text associated with the given number? It is not a memory address. Thus using ReadProcessMemory with this value instead of _item doesn't work...
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Great job with the code, I’ve got some information from Outlook’s Express List View thanks to it. Now I would like to do the same thing but with Microsoft Outlook’s SUPERGRID. I’ve done the same thing as before – Localized SUPERGRID with FindWindowEx(…) and then , because SUPERGRID (from what I know)is derived from CListCtrl which encapsulates the functionality of a "list view” control, I tried to send some LVM_.... messages with SendMessage(…) to get any kind of information. Of course it didn’t work …. any ideas?
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
Using similar code I can get a handle to the component but of course the messages do not work. I want to fetch the data from a TStringGrid belonging to a different application. Any ideas?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
|
Hi, Very nice code - worked inside 5 minutes on ALL of my apps with any listviews in.
However the actual app I am interested in reading the list view from (a third party windows app with three listviews in) cannot access the list. The valid hadle (from Spy++) for the listview32 comes back with nothing at all count=0 even though I know the listview in question has items in!
Is there any way this code won't work on any windows app if it was written and obfruscated/secured?
Any help appreciated
Clive
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Hi I am replying to your post in "Stealing Program's Memory" The actual phrase that caught my attention was "However the actual app I am interested in reading the list view from (a third party windows app with three listviews in) cannot access the list
Did you ever find the solution to that? I have an app that doesn't want to behave either Best Regards Charles
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Is there a way to select an item of a list or set text of a list? Basically the reverse of what was shown here?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
 | a |  | Anonymous | 10:57 9 Dec '04 |
|
|
 |
 | b |  | Anonymous | 1:39 10 May '05 |
|
|
 |
|
|
 |
|
|
 |
|
|
Hi,
I'm working on a kind of macro-tool, and want to retrieve the Name of the selected object. But what's even more important: I want to be able to find the control back by this Name!
Is this possible in the way you do this to listviews?
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
|
General News Question Answer Joke Rant Admin
|