flat assembler
Message board for the users of flat assembler.

Index > Windows > Resource HTML/ShowHTMLDialog program attempt

Author
Thread Post new topic Reply to topic
Anthony H.



Joined: 06 May 2006
Posts: 3
Location: Gold Coast, AUSTRALIA
Anthony H.
Hi

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. Smile

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.

Thanks.

Anthony.
Anth205@hotmail.com


Description: See CODE section for line-by-line comments
Download
Filename: HTMLDlg.asm
Filesize: 4.43 KB
Downloaded: 61 Time(s)

Post 06 May 2006, 06:57
View user's profile Send private message Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1607
Location: Ukraine
shoorick
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 Wink
regards1
Post 06 May 2006, 07:49
View user's profile Send private message Visit poster's website Reply with quote
Anthony H.



Joined: 06 May 2006
Posts: 3
Location: Gold Coast, AUSTRALIA
Anthony H.
Hi,

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?

Thanks hoorick

Anth.
Post 07 May 2006, 01:57
View user's profile Send private message Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1607
Location: Ukraine
shoorick
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...
Post 08 May 2006, 08:14
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.