This is a repost of the long lost original Web Browser Control source I developed
about 3 years ago. I'm reposting this because of emails/posts I've seen from other
members. I'm also developing an actual Web Browser sample (i.e., rebar, toolbar,
combobox, statusbar, and navigation).

:alright:

Xtreme
Posted on 2004-01-27 15:09:05 by Xtreme
GPF's on win2k sp4, memory read error. Haven't traced it, but the address is 0x779da930, indicating a system DLL.
Posted on 2004-01-27 15:24:38 by f0dder
Hi F0dder,

Its been a while....

I'm guessing this code had a lot of problems but since I'm planning to remove all of the macros/invokes and optimize
it, its just as well...
Posted on 2004-01-27 15:29:18 by Xtreme
hrm, why remove macros/invoke, as those tend to make the code more readable? Can't really see how that would be much of an optimization anyway - focus on more important issues, like ironing out bugs and write some proper documentation.
Posted on 2004-01-27 15:53:51 by f0dder
Yes, it died in system. I have WinXP.
Is there a fixed version already?
Posted on 2004-02-02 18:06:15 by SolidCode
When I pressed Back button in WB under OllyDbg, it gave me GPF
read from address [0] at 769E417Fh in module shdocvw.
It looks like trying to call a COM function from .
Posted on 2004-02-02 18:17:46 by SolidCode
Have you guys tried rebuilding the app and then testing it?

I can't reproduce either problem....
Posted on 2004-02-02 18:45:14 by Xtreme
Afternoon, Xtreme.

Rebuilt and tested.

WinXP Prof.

Works fine:alright: .

Cheers,
Scronty
Posted on 2004-02-03 06:10:26 by Scronty
Well, guys, it must be then my computer.
'Cause I just rebuilt it in RadASM.
Opening things from inside the browser control (clicking links) is fine, but clicking "Back" or "Forward" causes a GPF in shdocvw.
As you start it, these buttons do nothing.
Then I press "Back" while being in the first page I see. There is basicly no page to see this way. But the program does not check it and dies at 769E417F trying to read from address retrieved from in shdocvw module. Since this memory has 0, we die reading from memory at address of zero.
Now starting it and pressing "Forward" takes me to the other site. Now "Back" works just fine to take us to the first site again. Now I press "Forward" to go to SonShineSoftware and die with GPF. So what did I do wrong.
Btw, we're dead again by trying to read memory from address gotten from
I have WinXP Professional 2002.
Posted on 2004-02-03 10:24:50 by SolidCode
well I made some changes to make it work on win2k sp 4

Browser.asm
      include Browser.inc       ; local includes for this file


[color=3366FF].data?

bstrURL dw MAX_PATH*2 dup(?)
szDefaultResURL db MAX_PATH dup(?)[/color]

.code
; Create the MS Web Browser COM Object

[color=3366FF]invoke CreateWebBrowser, hWnd, 0, OFFSET bstrURL, OFFSET szDefaultResURL ; 0 = StatusBar hWnd[/color]
WBCtl.asm
; Misc. Methods

CreateObject proto :DWORD
GetConnectionPoint proto :DWORD, :DWORD, :DWORD
AdviseWBEventSink proto :DWORD
[color=3366FF]CreateWebBrowser proto :DWORD, :DWORD, :DWORD, :DWORD[/color]
CreateWebBrowser proc hWin:DWORD, hStatusWin:DWORD, bstrURL:DWORD, szDefaultResURL:DWORD


LOCAL pif:DWORD
LOCAL rcClient:RECT
LOCAL msg:MSG
LOCAL vtEmpty:VARIANT



; Store Handles
; Convert the path to BSTR

;invoke GetAppPath, [color=3366FF]szDefaultResURL[/color]
;invoke szCatStr, [color=3366FF]szDefaultResURL[/color], addr FQPath
invoke MultiByteToWideChar,CP_ACP, 0,addr FQPath, -1, [color=3366FF]bstrURL[/color], MAX_PATH * 2
.IF !eax
jmp fail
.ENDIF



; Navigate to a "Web Page"
coinvoke _pWebBrowserOC,IWebBrowser,Navigate,[color=3366FF]bstrURL[/color], addr vtEmpty, addr vtEmpty, addr vtEmpty, addr vtEmpty
.IF_FAILED
jmp fail
.endif
Posted on 2004-02-03 11:49:51 by arkane