Message board for the users of flat assembler.
> Windows > Resource HTML/ShowHTMLDialog program attempt
Anthony H. 06 May 2006, 06:57
I'm a high-level beginner programmer with Win32 ASM. I was hoping that someone could look at a program I'm trying to make. The program uses a resource html link and the ShowHTMLDialog api from MSHTML.DLL. I've used OllyDebug to analyse the program step by step and everything seems to run successfully, but the HTML dialog doesn't appear on the screen. I've put comments in the ASM file so you don't get lost in my mess.
Most of the code I've tried to translate from C++ examples in the Win2003Platform SDK from microsoft, and some sniplets from an FASM example program.
|06 May 2006, 06:57||
shoorick 06 May 2006, 07:49
hi! i'm not familiar with this api, but look at this:
1.invoke wsprintf -> cinvoke wsprintf (it is not masm)
2.invoke ShowHTMLDialog,eax i changed to invoke ShowHTMLDialog,0 (as well as in your code there is ShowHTMLDialog address in eax at that moment)
3.this function returns error "file not found" -> this means there is just no "default.html" in the resources (as i understand)
maybe this will help
|06 May 2006, 07:49||
Anthony H. 07 May 2006, 01:57
As I've mentioned in the code file, I'll be using a program called ResHacker.exe - which I downloaded from astalavista.net ages ago, not sure where to find it anymore but it basically allows you to edit the rsrc section directly from the EXE file - to add all the HTML and other stuff. right now I just wanted to make the main program work at a basic level.
Before I knew about the ShowHTMLDialog API, which can be found in the current Windows 2003 Server PlatformSDK freely downloadable from the Microsoft MSDN website, I actually used the shellexecute api to call the res:// url directly, which opened up Internet Explorer and showed the res contents. That worked fine.
On another note, you said to use cinvoke to call wsprintf? I think the wsprintf lines work inline with the other code. What is the difference between cinvoke and invoke, in general and in relation to this program?
|07 May 2006, 01:57||
shoorick 08 May 2006, 08:14
about cinvoke and invoke:
invoke used for function with stdcall conventions (stack cleared by called function)
cinvoke - for c-call (stack cleared by calling code)
in masm there is PROTO, where this type declared, so invoke knows - to call stack or not. in fasm there is no such, so you have to know it and choose (c)invoke by yourself. ab. html api - i did not used it before so just can not say more...
|08 May 2006, 08:14||
< Last Thread | Next Thread >
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.