Please Help.

This code below get the IHTML Documet Interface from a hwnd. The code works
just the way i want on Windows 2000. Is there a way to do the same in
Windows 98?.

[sha]

code
.............................................................................
...

Option Explicit
Function IEDOMFromhWnd(ByVal hwnd As Long) As HTMLDocument
Dim IID_IHTMLDocument As UUID
Dim hWndChild As Long
Dim lRes As Long
Dim lMsg As Long
Dim hr As Long
MsgBox "Inne i IEDOMFromhWnd"
If hwnd <> 0 Then
If Not IsIEServerWindow(hwnd) Then
' Get 1st child IE server window
EnumChildWindows hwnd, AddressOf EnumChildProc, hwnd
End If
If hwnd <> 0 Then
' Register the message
MsgBox "Før RegisterWindowMessage(WM_HTML_GETOBJECT)"
lMsg = RegisterWindowMessage("WM_HTML_GETOBJECT")
MsgBox "etter RegisterWindowMessage(WM_HTML_GETOBJECT)"
' Get the object
Call SendMessageTimeout(hwnd, lMsg, 0, 0, SMTO_ABORTIFHUNG, 1000,
lRes)
If lRes Then
' Initialize the interface ID
MsgBox "før With IID_IHTMLDocument" & lRes
With IID_IHTMLDocument
.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
' Get the object from lRes
MsgBox "før ObjectFromLresult"
hr = ObjectFromLresult(lRes, IID_IHTMLDocument, 0,
IEDOMFromhWnd)

End If
End If
End If
End Function
Function EnumChildProc(ByVal hwnd As Long, lParam As Long) As Long
If IsIEServerWindow(hwnd) Then
lParam = hwnd
Else
EnumChildProc = 1
End If
End Function
Function IsIEServerWindow(ByVal hwnd As Long) As Boolean
Dim lRes As Long
Dim sClassName As String
' Initialize the buffer
sClassName = String$(100, 0)
' Get the window class name
lRes = GetClassName(hwnd, sClassName, Len(sClassName))
sClassName = Left$(sClassName, lRes)
IsIEServerWindow = StrComp(sClassName, "Internet Explorer_Server",
vbTextCompare) = 0
End Function
Public Function GetTextFromIES(ByVal hwnd As Long)
Dim oDoc As HTMLDocument
Dim sHTML As String
Dim ret As Long
'ret = SendMessage(hwnd, WM_USER + 18, 0&, 0&)
Set oDoc = IEDOMFromhWnd(hwnd)
DoEvents ' hmm do i need this
' Get the page HTML
sHTML = oDoc.Body.innerText
m_SearchStr = sHTML
End Function