flat assembler
Message board for the users of flat assembler.

Index > Windows > help! how to make dos .com application can load dialog box??

Author
Thread Post new topic Reply to topic
senolc_eht



Joined: 22 Mar 2004
Posts: 57
Location: Indonesia
senolc_eht
can any body help me how to make that...

like in symantec removal tool (windows 98 )

my regard
Senolc_eht

_________________
sorry if i always asking.....
Post 14 Jun 2005, 18:34
View user's profile Send private message Yahoo Messenger Reply with quote
Feryno



Joined: 23 Mar 2005
Posts: 464
Location: Czech republic, Slovak republic
Feryno
This is the way:
dos *.com file contain windows exe file as data.
com file create (write) windows exe file
com file run window exe file
com file exit

here you have small example
file isn't dialog box example - graphics demo - but windows exe can contain everything else as you like, e.g. dialog box

dbg.com is unpacked original matrix.com file
raw disassembling dbg.com:
00000000 B45B mov ah,0x5b
00000002 31C9 xor cx,cx
00000004 BA4501 mov dx,0x145
00000007 52 push dx
00000008 52 push dx
00000009 CD21 int 0x21
0000000B 89C3 mov bx,ax
0000000D B440 mov ah,0x40
0000000F B9001C mov cx,0x1c00
00000012 BA4301 mov dx,0x143
00000015 CD21 int 0x21
00000017 B43E mov ah,0x3e
00000019 CD21 int 0x21
0000001B B44A mov ah,0x4a
0000001D BB0010 mov bx,0x1000
00000020 CD21 int 0x21
00000022 5A pop dx
00000023 89261701 mov [0x117],sp
00000027 B8004B mov ax,0x4b00
0000002A BB4D01 mov bx,0x14d
0000002D CD21 int 0x21
0000002F 8B261701 mov sp,[0x117]
00000033 8CC8 mov ax,cs
00000035 8ED0 mov ss,ax
00000037 8ED8 mov ds,ax
00000039 5A pop dx
0000003A B441 mov ah,0x41
0000003C CD21 int 0x21
0000003E F4 hlt
0000003F F4 hlt
00000040 72F8 jc 0x3a
00000042 C3 ret ; exit
00000043 db 'MZ' ; windows exe file begin here
....


Description: original matrix.com file from
http://pouet.net/prod.php?which=10782

Download
Filename: doswin.zip
Filesize: 8 KB
Downloaded: 125 Time(s)

Post 15 Jun 2005, 05:53
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
senolc_eht



Joined: 22 Mar 2004
Posts: 57
Location: Indonesia
senolc_eht
hi Feryno...

Thanks for you help, hmm just like self-ekstractor and run the windows exe, am I right?

i was wonder how to call kernel32.dll or user32.dll procedure from an dos application Smile

i understand now..

my regard

Senolc_eht
Post 17 Jun 2005, 03:52
View user's profile Send private message Yahoo Messenger Reply with quote
Torrey



Joined: 12 Oct 2003
Posts: 78
Torrey
Here's a quick example for you to check out. I created a fakecom template file that you can use.

Compile the fakecom.asm and then compile simple.asm afterwards run the bind.bat file to bind the two files.


Description:
Download
Filename: fakecom.zip
Filesize: 1.04 KB
Downloaded: 142 Time(s)

Post 17 Jun 2005, 04:54
View user's profile Send private message Visit poster's website Reply with quote
polygon7



Joined: 14 Aug 2003
Posts: 62
Location: Poznan, Poland
polygon7
Hi,
(i havent tested this but...) you could try to run rundll.dll from dos (int 21 / 4bh or int 3f if i remember correctly), an then call user32->CreateDialogParam or other dialog procedures.

_________________
best regards
p7
Post 17 Jun 2005, 08:06
View user's profile Send private message Visit poster's website Reply with quote
Torrey



Joined: 12 Oct 2003
Posts: 78
Torrey
polygon7 wrote:
Hi,
(i havent tested this but...) you could try to run rundll.dll from dos (int 21 / 4bh or int 3f if i remember correctly), an then call user32->CreateDialogParam or other dialog procedures.


rundll is a 16-bit version, and rundll32 is a 32-bit version. Not all API's are compatible with these programs. The exported DLL function itself has to support it.

Read this for more information.
Post 17 Jun 2005, 08:20
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.