Xtreme,

the new exe still doesn't work under Win NT 4.0. Shows a white screen. Most probably this will be error 0x80004005 (E_FAIL) after Navigate.

Will look after it later. Currently I'm busy recovering from a HD crash.

japheth
Posted on 2001-08-30 05:17:52 by japheth
This is what it looks like on Win2k

At least something comes up this time :) Before it didn't do that :)
Posted on 2001-08-30 14:16:52 by Kenny
Kenny,

Thats it!
The button just displays an Alert box.
(I was working on the ShowMessage handler at the time).


Japheth / Everyone,

Last night, I revomed the GETOBJECTPOINTER macro and mixed
the code in with the QueryInterface. Then started optimizing
its code. Can't we remove the IIUnknown-like structs and make
Objects members dwords? Like so:



Object struct
iUnknown dd ?
iBase0 dd ?
iOleWindow dd ?
iBase1 dd ?



The New QueryInterface Proc:



QueryInterface proc uses ebx ecx pif:DWORD, riid:DWORD, ppv:DWORD


LOCAL iface:DWORD

invoke IsEqualGUID, [riid], addr IID_IUnknown
test eax,eax
mov iface, 1
jnz @F

invoke IsEqualGUID, [riid], addr IID_IOleClientSite
test eax, eax
mov iface, 2
jnz @F

invoke IsEqualGUID, [riid], addr IID_IDocHostUIHandler
test eax, eax
mov iface, 3
jnz @F

invoke IsEqualGUID, [riid], addr IID_IDocHostShowUI
test eax, eax
mov iface, 4
jnz @F

invoke IsEqualGUID, [riid], addr IID_IOleInPlaceSite
test eax, eax
mov iface, 5
jnz @F

invoke IsEqualGUID, [riid], addr IID_IDispatch
test eax, eax
mov iface, 6
jnz @F

invoke IsEqualGUID, [riid], addr DIID_DWebBrowserEvents2
test eax, eax
mov iface, 6
jnz @F

jmp @Error

@@:

mov eax, pif
sub eax, [eax + 4]

.IF iface == 1

mov ecx, (Object ptr [eax]).iUnknown
lea eax, (Object ptr [eax]).iUnknown
mov ebx, [ppv]
mov dword ptr [ebx], eax
invoke (IIUnknownVtbl ptr [ecx]).AddRef, [pif]

.ELSEIF iface == 2

mov ecx, (Object ptr [eax]).iOleClientSite
lea eax, (Object ptr [eax]).iOleClientSite
mov ebx, [ppv]
mov dword ptr [ebx], eax
invoke (IIOleClientSiteVtbl ptr [ecx]).AddRef, [pif]

.ELSEIF iface == 3

mov ecx, (Object ptr [eax]).iDocHostUIHandler
lea eax, (Object ptr [eax]).iDocHostUIHandler
mov ebx, [ppv]
mov dword ptr [ebx], eax
invoke (IIDocHostUIHandlerVtbl ptr [ecx]).AddRef, [pif]

.ELSEIF iface == 4

mov ecx, (Object ptr [eax]).iDocHostShowUI
lea eax, (Object ptr [eax]).iDocHostShowUI
mov ebx, [ppv]
mov dword ptr [ebx], eax
invoke (IIDocHostShowUIVtbl ptr [ecx]).AddRef, [pif]

.ELSEIF iface == 5

mov ecx, (Object ptr [eax]).iOleInPlaceSite
lea eax, (Object ptr [eax]).iOleInPlaceSite
mov ebx, [ppv]
mov dword ptr [ebx], eax
invoke (IIOleInPlaceSiteVtbl ptr [ecx]).AddRef, [pif]

.ELSEIF iface == 6

mov ecx, (Object ptr [eax]).iDispatch
lea eax, (Object ptr [eax]).iDispatch
mov ebx, [ppv]
mov dword ptr [ebx], eax
invoke (IIDispatchVtbl ptr [ecx]).AddRef, [pif]

.ENDIF

mov eax, S_OK
ret

@Error:
mov eax, [ppv]
mov dword ptr [eax], 0
mov eax, E_NOINTERFACE
ret

QueryInterface endp


Thanks,
Xtreme
Posted on 2001-08-30 14:19:43 by Xtreme