IceWater42 wrote:
int nRet = SendMessage(hWndC.ToInt32(), WM_GETTEXT, cap, buffer);
It fails on 64-bit machines because window handles in 64-bit Windows are 64 bits wide. Look at what you passed in the first parameter. A signed, 32-bit integer, instead of a 64-bit wide IntPtr. Change that so hWndC returns an IntPtr and it should work.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008