The MASM Forum
General => The Workshop => Topic started by: jj2007 on July 27, 2012, 07:39:41 AM
-
Many of you are probably aware of JIE, Japheth's Internet Explorer, http://www.japheth.de/dwnload1.html - look for JIE inside the page:
JIE: 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 (http://www.japheth.de/WinInc.html) include files.
Source code is in IEContainerSample.zip (http://www.japheth.de/Download/Samples/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'.
-
works fine after correcting some errors in eventobj.asm (the loacal vt is incorrectly used in the function Invoke_)
-
What the heck is VARIANTARG??
Without your corrections, do you get the same linker errors?
-
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.
-
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.
-
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.
-
VARIANT_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 (http://msdn.microsoft.com/en-us/library/aa768288(v=vs.85).aspx)
-
Does it assemble for you? My assembler doesn't like it.
-
yes, but jwasm warns about the missing size information -> you must cast it to a WORD:
mov [ecx].VARIANT_BOOL, WORD ptr VARIANT_TRUE
-
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
-
sorry, it should be:
mov WORD ptr [ecx],VARIANT_TRUE
-
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.