Hello,

Need a simple code for a PE Loader to make a Messagebox
without WinAPI needed.

Need only Captiontext, Text and OK Button.

Thanks.
Posted on 2003-04-15 09:29:10 by Fred
Have a look at this.

http://www.programmingjournal.com/issue4/art3/

Get the address of LoadLibrary and GetProcAddress and then use them to load user32.dll and to get the address of MessageBox.
Posted on 2003-04-15 10:03:24 by roticv
there's no way to do it without _any_ windows API.
The way roticv is hinting is reasonable. Find kernel32 (grab a kernel32 proc addr from the IAT and backscan - be sure to do this in a SEH, and backscan by 4k, and be sure that you pick an import that is _NOT_ forwarded to another DLL)).

If you write your own GetProcAddress, you also need to handle ordinals and forwarded exports. Iirc, rheingolds code handle neither.
Posted on 2003-04-15 10:07:24 by f0dder

Hello,

Need a simple code for a PE Loader to make a Messagebox
without WinAPI needed.

Need only Captiontext, Text and OK Button.

Thanks.


I remember that you or someone else already asked it before.

BTW, wrong forum, moved from MASM32.


EDIT:

Yep, you already asked:

http://www.asmcommunity.net/board/index.php?topic=9373

And comrade attached a solution on this thread. Wonder why you ask again...
Posted on 2003-04-15 11:54:32 by bazik
because he's dull? ^_^
Posted on 2003-04-15 12:03:10 by f0dder