News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

WebBrowser control

Started by jj2007, July 27, 2012, 07:39:41 AM

Previous topic - Next topic

jj2007

Many of you are probably aware of JIE, Japheth's Internet Explorer, http://www.japheth.de/dwnload1.html - look for JIE inside the page:
QuoteJIE: is - like OCX Container - an ActiveX control container, but with special adjustments for hosting the IE WebBroser control. This makes this sample a very small, but fully functional WebBrowser. It's Public Domain and uses the WinInc include files.
Source code is in IEContainerSample.zip
The archive contains the executable, a 9kByte file that is remarkably close to a real browser ;-)

Question: Has anybody managed to assemble & link the source...??
Assembly works for me, but the linker throws errors:
POLINK: error: Unresolved external symbol '_DestroyWBContainer@4'.
POLINK: error: Unresolved external symbol '_CreateWBContainer@4'.


qWord

works fine after correcting some errors in eventobj.asm (the loacal vt is incorrectly used in the function Invoke_)
MREAL macros - when you need floating point arithmetic while assembling!

jj2007

What the heck is VARIANTARG??
Without your corrections, do you get the same linker errors?

qWord

#3
VARIANT types are used by COM objects and allow to safely exchange arbitrary data.
I do not get any linker error, but I also use the libraries from the Windows SDK.
MREAL macros - when you need floating point arithmetic while assembling!

Ryan

The two procs in question are defined in container.asm.  You'll have to assemble all the .asm files, and then link all their .obj files... I think.  I'm still working through it.

Ryan

I'm stuck on
        mov ecx,vt.byref
        mov [ecx].VARIANT_BOOL, VARIANT_TRUE


VARIANT_BOOL is defined as SWORD in wtypes.inc.  How does that apply in the dereferencing of ecx?

EDIT: This is in the Invoke_ proc about line 256 in eventobj.asm.
2: I think it should be boolVar instead of VARIANT_BOOL.  It occurred to me to look at the VARIANT structure, and boolVar has that type.

qWord

Quote from: Ryan on July 27, 2012, 10:19:51 AMVARIANT_BOOL is defined as SWORD in wtypes.inc.  How does that apply in the dereferencing of ecx?
This is because it is an pointer to VARIANT_BOOL (SWORD) -> NewWindow3 event
MREAL macros - when you need floating point arithmetic while assembling!

Ryan

Does it assemble for you?  My assembler doesn't like it.

qWord

yes, but jwasm warns about the missing size information -> you must cast it to a WORD:
mov [ecx].VARIANT_BOOL, WORD ptr VARIANT_TRUE
MREAL macros - when you need floating point arithmetic while assembling!

Ryan

The macro assembler doesn't like that either.

Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997.  All rights reserved.

Assembling: C:\masm32\IEContainer\eventobj.asm
C:\masm32\IEContainer\eventobj.asm(258) : error A2166: structure field expected


qWord

sorry, it should be:
mov WORD ptr [ecx],VARIANT_TRUE
MREAL macros - when you need floating point arithmetic while assembling!

Ryan

Thanks qWord.  That worked.

I got an .exe out of it.  It took a few modifications.  That must be the difference between JWasm and masm.