flat assembler
Message board for the users of flat assembler.

Index > Windows > different MSG boxes under XP

Author
Thread Post new topic Reply to topic
HarryTuttle



Joined: 26 Sep 2003
Posts: 211
Location: Poland
HarryTuttle 18 Feb 2005, 15:02
Hi,

compile first this code, under name: lok_dll.dll
Code:
format PE GUI 4.0 DLL
include '%fasminc%/win32a.inc'
section '.data' data readable writeable
check   dd    0
napis db "\\.\mailslot\olal",0

entry   EntryDLL

section '.code'     code readable executable

proc    EntryDLL    ,a,b,c
        enter
        sub esp     ,100

        mov [esp]   ,dword 'info'
        mov [esp+4] ,dword '-loa'
        mov [esp+8] ,dword 'ded!'
        mov [esp+12],dword 0
invoke CreateMailslot,napis,0,0,0
        cmp eax,-1
        jne dalej
        mov [esp+4] ,dword '-Fre'
        mov [esp+8] ,dword 'e!!!'
        mov [esp+12],dword 0
        inc [check]
dalej:
        lea eax     ,[esp]
invoke  MessageBox  ,0,eax,eax,0
        leave
        ret
endp



proc    alex,z
        enter
        return
endp

section '.idata'    import data readable writeable

library user32,     'USER32.DLL',\
        kernel,     'KERNEL32.DLL'

import  user32,\
        MessageBox, 'MessageBoxA'

import  kernel,\
        ExitProcess,'ExitProcess',\
        CreateMailslot,'CreateMailslotA'
section '.edata' export data readable

export  'lok_dll.dll',\
        alex,'alex'
section '.reloc' fixups data discardable
    

and then in the same directory plesae compile&run:

Code:
include '%fasminc%\win32ax.inc'
.code
start:
invoke LoadLibrary,"lok_dll.dll"
invoke ExitProcess,0
.end start
    


I dedicated the program to show when the system calls the dllentrypoint.
The result is the msgbox when library is loaded and the second one when is unloaded. The strange thing is the msgbox appearance.

why the both msgboxes have different frames?


regards,
h

_________________
Microsoft: brings power of yesterday to computers of today.
Post 18 Feb 2005, 15:02
View user's profile Send private message Reply with quote
HarryTuttle



Joined: 26 Sep 2003
Posts: 211
Location: Poland
HarryTuttle 22 Feb 2005, 11:06
ImageImage

it is not my little paranoja....

what is happened?

download

_________________
Microsoft: brings power of yesterday to computers of today.
Post 22 Feb 2005, 11:06
View user's profile Send private message 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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.