M
MyNuS
Guest
Ive been having problems with a module that I am working on. I can get my program to send a wm_gettext message to an other aplication, but it wont send the string to the buffer. The function returns the appropriate lenght of string copied, and every other message that i try to send with sendmessage works. Thanks for your help.
--------------------------CODE------------------------
Imports System.Runtime.InteropServices
Public Const WM_GETTEXT = &HD
<DllImport("user32.dll")> _
Public Function SendMessage(ByVal hWnd As Integer, ByVal uMsg As Integer, ByVal wParam As Integer, ByVal lParam As String) As Integer
End Function
Function getWinText() As String
Dim n As Integer, s As String, q As Integer
s$ = Space$(255)
n = SendMessage(3080978, WM_GETTEXTLENGTH, 0, 0)
q = SendMessage(3080978, WM_GETTEXT, 254, s$)
getImSn = s$
End Function
--------------------------CODE------------------------
Imports System.Runtime.InteropServices
Public Const WM_GETTEXT = &HD
<DllImport("user32.dll")> _
Public Function SendMessage(ByVal hWnd As Integer, ByVal uMsg As Integer, ByVal wParam As Integer, ByVal lParam As String) As Integer
End Function
Function getWinText() As String
Dim n As Integer, s As String, q As Integer
s$ = Space$(255)
n = SendMessage(3080978, WM_GETTEXTLENGTH, 0, 0)
q = SendMessage(3080978, WM_GETTEXT, 254, s$)
getImSn = s$
End Function