Re IWebBrowser:

per MSDN:

"The IWebBrowser2 interface derives from IDispatch indirectly. IWebBrowser2 derives from IWebBrowserApp, which in turn derives from IWebBrowser, which finally derives from IDispatch.

Note The IWebBrowser and IWebBrowserApp interfaces are deprecated."

I found the IWebBrowser2 headers in EXDISP.H

I hope this helps (but you probably know all this already)

PS: How are you getting this far without handling events?

Or are you handling them as a matter of course?
Posted on 2001-08-26 00:30:06 by Ernie

to your assembling error: I forgot that I had extended macro coinvoke some weeks ago. I did this because an interface is a pointer to a pointer to a vtable, not just a pointer to a vtable as in ernies colib. Since the interface definitions in your source code are correct (always defined an Ixxx and an IxxxVtbl struct), my modified macro worked with your code automatically. So to avoid your error you can do one of the following:

1. "improve" macro coinvoke in oaidl.inc to

coinvoke MACRO pInterface:REQ, Interface:REQ, Function:REQ, args:VARARG
LOCAL istatement, arg
FOR arg, <args> ;; run thru args to see if edx is lurking in there
IFIDNI <&arg>, <edx>
.ERR <edx is not allowed as a coinvoke parameter>
IFIDNI <&pInterface>, <edx>
.ERR <edx is not allowed as a coinvoke parameter>
ifdef Interface&Vtbl
istatement CATSTR <invoke (Interface&Vtbl PTR[edx]).&Interface>,<_>,<&Function, pInterface>
istatement CATSTR <invoke (Interface PTR[edx]).&Interface>,<_>,<&Function, pInterface>
IFNB <args> ;; add the list of parameter arguments if any
istatement CATSTR istatement, <, >, <&args>
mov edx, pInterface
mov edx, [edx]

2. or change the definition of IWebBrowser to:

; IWebBrowser struct
; lpVtbl dd ?
; IWebBrowser ends

; IWebBrowserVtbl struct
IWebBrowser struct
IIDispatchVtbl <>
STDMETHOD IWebBrowser_Navigate, pif:DWORD, bstrURL:dword,Flags:ptr,TargetFrameName:ptr,PostData:ptr,Headers:ptr
; IWebBrowserVtbl ends
IWebBrowser ends

Posted on 2001-08-26 01:00:49 by japheth

There is nothing "missing" in my coinvokle macro. It defines "pInterface" as "(a) pointer to a specific interface instance," which is a long winded way of saying an object reference.

And the object contains the pointer to the vtable. coinvoke works just this way.

pObj -> pVtable -> pMethod

Your version seems to allow an alias for the Interface structure name, that being the name with "Vtbl" as a suffix. That's OK to do if you want you can define things such (perhaps your brain sees it clearer this way), but it is unnessary.

An interface IS a structure, and it's simpler (to my brain) if we just declare it as such.

The orgional coinvoke would work with your definition is you simply equate your extended name with the real interface name.
Posted on 2001-08-26 09:47:15 by Ernie

of course your macros are "correct" because they are working. And let me say: you have done a great job creating the colib. But I cannot agree with you saying "..it is unnessessary". Your macro and your "interface" definitions lack one level of indirection (an interface is here just regarded as a pointer to a vtable). This is a definition "problem", not a problem of generated code, so one could at first glance say "who cares". But if you want to examine your code and variables with a debugger (VC i.e.), it is unable to show the correct values of the vtable, it just shows rubbish.
A similar problem is that of the "untyped" parameters of the interface methods defined in oaidl ... It works, but when running under a debugger, it is unable to show the parameters because they all are defined as dwords. The "untyped" parameters are absolutely ok for "outgoing" declarations in the Win32 API, but not for functions you have to code (as in COM).
I'm afraid you will tell me now you are never using stuff like debuggers, but consider: not all guys want or can develop their code without this toys. So be not too rigid.

Posted on 2001-08-26 11:51:56 by japheth
Heh, of course I never use a debugger. I never saw the point.

If you need things defined for the debugger, then yes, it's quite proper to define things so the debugger can parse them. But is is incorrect to say "Your macro and your "interface" definitions lack one level of indirection," as they have exactly that, it's just that the debugger gets confused.

OK, enough, I'm being overly pedantic, I just don't like reading some well worn FUNCTIONING code I've released is said to not work.
Posted on 2001-08-26 13:49:13 by Ernie
Ok, Ernie, better stop reading now, you will not like the following. I'm pedantic, too. And the typedefs of CALLCONV, FUNCKIND and INVOKEKIND (members of FUNCDESC) in your well worn FUNCTIONING code dont work for example. They all are defined as SWORDs but indeed they should be defined as SDWORDs or DWORDs. And these are "true" errors.

Posted on 2001-08-26 14:17:01 by japheth
That's what I like about this board - we work together to create flexible solutions for everybody. :alright:
Posted on 2001-08-26 14:36:30 by bitRAKE
bitRake, you are right. I must apologize. Sorry, Ernie

Posted on 2001-08-26 14:47:16 by japheth

Posted on 2002-01-15 06:02:42 by brainspin
:o Heres the original C++ source code. Its actually useful in itself because it doesn't use MFC.

Is somebody playing tricks on me? I can't see no code to download :( :grin:

I was following this thread closely. I just missed it for a day and a lot was already discussed by you ppl. No fair! Puleez, you'll save me a lot of pain by sharing that code ;)

I too tried to use IWebBrowser with C++ (sans MFC) but got stuck with the client site part so had to rip off some from MFC's code (particularly CWnd). So it's still "impure" :) I'd really love to see that code X uploaded (?)
Posted on 2002-01-15 08:29:17 by pixelwise
heres the C++ source Xtreme uploaded in 09/2001
Posted on 2002-01-15 09:18:15 by japheth
Thnx, Japheth!

How come you're always the first one to reply to such requests? :grin:



09/2001?? geez, you mean this is an old thread? Now I feel stupid. Oh well, I've been frequenting this forum for just the last month...
Posted on 2002-01-15 10:01:48 by pixelwise
because I'm very polite :)
Posted on 2002-01-15 10:25:37 by japheth

Thats the C version.. dont like it all to much.. This is the masm32 version he was hacking thu (his last release that i know of).

I corrected some of the probs that Japheth found when it was origionally posted, and modified the HTML index to have usefull links...


PS: Extreme come back and finish your work, pleeeeeeaaaaaze! :grin:
Posted on 2002-01-23 23:57:40 by NaN

i work with the code, and it works fine for me.
But I've a question: How can I remove the 3d Border from the webcontrols?

Posted on 2005-01-26 03:34:05 by Nordwind64

ok, ok. I found a better solution. Please read here: http://www.asmcommunity.net/board/viewtopic.php?t=20458

Posted on 2005-01-31 09:57:43 by Nordwind64