Modify the code obtained from the Internet Explorer_Server HWND handle
vb.net Code:
Public Structure UUID
Public Data1 As Long
Public Data2 As Integer
Public Data3 As Integer
Private m_Data4() As Byte
Public ReadOnly Property Data4() As Byte()
Get
If Me.m_Data4 Is Nothing Then
ReDim Me.m_Data4(7)
End If
Return Me.m_Data4
End Get
End Property
End Structure
Private Const WM_GETTEXT = &HD
Private Const SMTO_ABORTIFHUNG = &H2
Dim hwnd5 As IntPtr
Dim hwnd2 As IntPtr
hwnd2 = GetDesktopWindow()
hwnd5 = FindWindowEx(hwnd2, 0, "CConvWndBase", vbNullString) '(YSearchMenuWndClass)
Dim hwnd3 As IntPtr = FindWindowEx(hwnd5, 0, "YHTMLContainer", vbNullString)
Dim hwnd7 As IntPtr= FindWindowEx(hwnd3, 0, "Internet Explorer_Server", vbNullString)
Dim obj As HtmlDocument
S2 = String(100, " ") << need to change
Set Obj = WDom(hwnd7) << need to change<br/></span><span>
Private Function WDom(ByVal hWnd As Long) As IHtmlDocument
Dim U As UUID, L As Long, M As Long
M = RegisterWindowMessage("WM_HTML_GETOBJECT")
If M <> 0 Then
SendMessageTimeout(hWnd, M, 0, 0, SMTO_ABORTIFHUNG, 1000, L)
If L <> 0 Then
With U
.Data1 = &H626FC520 : .Data2 = &HA41E
.Data3 = &H11CF : .Data4(0) = &HA7
.Data4(1) = &H31 : .Data4(2) = &H0
.Data4(3) = &HA0 : .Data4(4) = &HC9
.Data4(5) = &H8 : .Data4(6) = &H26
.Data4(7) = &H37
End With
ObjectFromLresult(L, U, 0, WDom)
End If
End If
End Function
Private Sub ObjectFromLresult(ByVal L As Long, ByVal U As UUID, ByVal p3 As Integer, ByVal WDom As IHtmlDocument)
' Throw New NotImplementedException
End Sub</span>
The above is my VB.NET code to convert the line with my application in VB.NET
However, there are several areas that need to modify trouble please guide mehow to modify those parts of
Can be successfully used in VB.NET
S2 = String(100, " ") << need to change
Set Obj = WDom(hwnd7) << need to change
Now I know that these two small areas need to be modified if there is need to change which side I thank you also please be guided
Re: Modify the code obtained from the Internet Explorer_Server HWND handle