Hello there, people.

1: I recently started to code in win32 asm and I saw that some examples/tuts do not have the WinMain procedure. Is it really necessary then? I remember writing in C, you just wouldn't compile anything without having at least your void main(void) function! And the examples I mean uses win API ('course)...
So, is there a limit for what APIs can we use before we start WinMain or what?

Question 2 is: I have a program that runs in a DOS windows (Im with win98) but claims to have acknowledge about all windows stuff, procedures, and so on. HOw is that?


Yeah... okie! See ya!! :-d
Posted on 2002-09-08 02:17:02 by wicr0s0ft
1. WinMain is not necessary. Some assembly code uses WinMain in order to resemble C, so that assembly code looks familiar to new coders who are migrating from C.

2. That's a console mode windows program. It cannot be run in dos.
Posted on 2002-09-08 02:39:53 by C.Z.
main /wnmain are the program entry points which c/c++ compilers look for.

you specify the entry point in masm with the end label directive where label was declared some where in the program. many of the examples floating around use start for the entry point label
Posted on 2002-09-08 05:45:42 by MArtial_Code
...and you don't have to use main/winmain when coding in C. Know your tools.
Posted on 2002-09-08 13:19:36 by f0dder
Thanks all! That was clarifying. :)

So can anyone name a reason to make a program's entry point not being the .start of it? All i can think is a "fancy" code distributin merely arbitrary by the coder...
Posted on 2002-09-09 17:37:07 by wicr0s0ft
if you don't have the entrypoint at start of your code-segment you can
use this free room as extra space for data-storage of for self-modifying
code etc. or if you like the pascal style where the procedures must be
above the real code you could just paste them before the START: label.
however, i don't see any real usefulness in that
Posted on 2002-09-10 04:48:58 by mob

i don't see any real usefulness in that

Heh, never heard "usefulness" before :)
Posted on 2002-09-10 04:53:26 by bazik

neither did I ....

well, I think that is it for this thread! :)

Posted on 2002-09-10 13:17:08 by wicr0s0ft