The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: xellos on August 10, 2009, 01:43:28 PM

Title: how long did it took you to understand how to make an win32 program
Post by: xellos on August 10, 2009, 01:43:28 PM
how long did it took you to understand how to make an standard win32 program?
if i look at the tut in masm folder its a bit overwelming :eek
Title: Re: how long did it took you to understand how to make an win32 program
Post by: ecube on August 10, 2009, 01:51:01 PM
Coming from C/C++ it didnt take long at all, most of win32 programming is just calling windows API +3rd party API, and interacting with COM and other services.You shud read Icezlions tut and follow along with the sources, to get caught up. If you have no programming experience I recommend you start with visual basic and google for things, like "how to use listview control in vb" etc...
Title: Re: how long did it took you to understand how to make an win32 program
Post by: Jimg on August 10, 2009, 03:29:51 PM
It been 20 years since I tried my first real windows program, and I still don't understand it.
Title: Re: how long did it took you to understand how to make an win32 program
Post by: dedndave on August 10, 2009, 04:10:34 PM
xellos - it does appear to be overwhelming
start very simple and add one function at a time
you will find it is way more powerful than 16-bit code
it is well worth the effort
also, much of what you are learning for 16-bit does not apply to 32-bit
and, 16-bit is becoming obsolete
learning 32-bit code will be time well spent
just be patient and don't let it frustrate you
when your program crashes - you have to laugh about it
if you get angry, your computer will be smashed, then the 16-bit code won't work, either
Title: Re: how long did it took you to understand how to make an win32 program
Post by: Astro on August 10, 2009, 06:02:50 PM
Quotewhen your program crashes - you have to laugh about it
if you get angry, your computer will be smashed, then the 16-bit code won't work, either
:lol  :cheekygreen:

Read the Iczelion tutorials. Take your time, read each line in turn, and understand it. You will then wonder what you were worried about when you reach the end!  :U  I was  :dance: after I spent a couple of hours on it.

Best regards,
Astro.
Title: Re: how long did it took you to understand how to make an win32 program
Post by: BATSoftware on August 12, 2009, 05:54:51 AM
Took me a few hours, but then I came from the VMS world so the concept of DLLs (Shared images inreality) and systems programing was just a matter of locating which routine wasneeded. I also knew GEM back way before Windows even existed. Just keep in mind Windows API is just a bunch of subroutines that Microsoft didnt want to document and today do everything in their power to hide from you. Nevertheless, WINAPI is still Windows...not .NET, not C# not Java not OLE/COM. All those "technologies" are nothing more that layers of crap piled upon the WinAPI.

One thing special about Windows programming vs console programming....Message quege!!!!! Windows is driven by the sending and receiving of messages. These messages are reflected in Visual Basic by the varous event routines a particular control responds to, or to the various events a COM control will issue. In short Windows is event-based. This differs from traditional mainfram/DOS programming which is linear and only responds to events when a special event system is constructed (ie interupts, interprocess status bits and so forth).
Title: Re: how long did it took you to understand how to make an win32 program
Post by: Farabi on August 12, 2009, 08:19:17 AM
6 month.
I studied it by modificating a working example, cut the procedure into a tiny procedure, and rearrange it to see if it will work.
Title: Re: how long did it took you to understand how to make an win32 program
Post by: dancho on August 12, 2009, 08:55:45 AM
After reading first 3 chapters from this book :
http://www.charlespetzold.com/pw5/index.html
it tooks me a few hours ( knowledge of C and masm required  :green )...
I'm highly recommend it...
Title: Re: how long did it took you to understand how to make an win32 program
Post by: arroso on August 12, 2009, 05:06:28 PM
coming from 8/16 bits pc asm and years of mainframe HASM once I found a precious WinApi hlp file
(a huge one of W2K times) and met Radasm and Iczelion, it all shaped up.
For a couple of years played on a heavily customized Win98 on a PIII and enjoyed "pairing" anything I could :D
Then switched to Win2K (still today) and have some fun with multithreading and 3D.
Right now my answer is "I don't know!". 2D it's ok - Ultrano libraries were a great starting point - but 3D could be a pita
on the long run.

@BATSoftware  100% agreed. Although both IMS and Win msg queues have affinities.



Title: Re: how long did it took you to understand how to make an win32 program
Post by: hutch-- on August 12, 2009, 11:47:07 PM
 :bg

Nevertheless, WINAPI is still Windows...not .NET, not C# not Java not OLE/COM. All those "technologies" are nothing more that layers of crap piled upon the WinAPI.

Yes, for all the "gee whiz", gooeys and the like, its all good old fashioned procedural programming based on the Windows API.
Title: Re: how long did it took you to understand how to make an win32 program
Post by: ramguru on August 13, 2009, 06:08:51 AM
Quote from: BATSoftware on August 12, 2009, 05:54:51 AM
...not .NET, not C# not Java not OLE/COM. All those "technologies" are nothing more that layers of crap piled upon the WinAPI.
DirectWrite (http://msdn.microsoft.com/en-us/library/dd368038%28VS.85%29.aspx) & Direct2D (http://msdn.microsoft.com/en-us/library/dd370990%28VS.85%29.aspx) are next generation API for 2d graphic & text rendering. And all those API can only used through COM interface. So OLE/COM is not another layer .. which core is WinAPI, it's an independent layer of procedures (that interacts with hardware in this case) that you can take advantage of or ignore.
Title: Re: how long did it took you to understand how to make an win32 program
Post by: Slugsnack on August 13, 2009, 10:50:19 AM
i wasn't aware java had winapi at its core either..
Title: Re: how long did it took you to understand how to make an win32 program
Post by: dedndave on August 13, 2009, 04:26:25 PM
it would seem logical that java uses win api calls to do it's tasks
.net - i am not so sure - certainly, much of it is api
but, because it comes from ms, they could have added low-level functions not available through api calls
i have no idea what they would be, though - lol
Title: Re: how long did it took you to understand how to make an win32 program
Post by: Rockoon on August 13, 2009, 05:14:05 PM
Quote from: dedndave on August 13, 2009, 04:26:25 PM
.net - i am not so sure - certainly, much of it is api
but, because it comes from ms, they could have added low-level functions not available through api calls
i have no idea what they would be, though - lol

The source to most of the .NET framework libraries is available, and is even source-level debuggable under .NET (step right into the framework libraries while debugging)

I don't know why .NET gets such a bad rep here. Its actualy very nice for what it is. Sure, its not at all powerfull from a low-level programmer standpoint, but its extremely powerfull from a high-level programmer standpoint. C# is winning over C++ programers in droves because its got all the good things that template programming allows (generics, first class functions, anonymous functions, etc..) without the need for an insane preprocessing language and without much sacrifice in performance. It is almost exactly what C++ should have been, and probably would have been if C++ didnt start off as a preprocessing hack for C compilers.
Title: Re: how long did it took you to understand how to make an win32 program
Post by: Slugsnack on August 13, 2009, 08:11:58 PM
Quote from: dedndave on August 13, 2009, 04:26:25 PM
it would seem logical that java uses win api calls to do it's tasks
.net - i am not so sure - certainly, much of it is api
but, because it comes from ms, they could have added low-level functions not available through api calls
i have no idea what they would be, though - lol
wouldn't make much sense for java to use winapi. i mean i THOUGHT it didn't because it ran multiplatform so the point would be that there was no dependency on any particular architecture/operating system
Title: Re: how long did it took you to understand how to make an win32 program
Post by: MichaelW on August 13, 2009, 09:01:07 PM
AFAIK the JVM is platform specific and it would be impractical for it to avoid the Windows API on the Windows platform.
Title: Re: how long did it took you to understand how to make an win32 program
Post by: Slugsnack on August 13, 2009, 10:05:13 PM
so you reckon it detects each system and has hardcoded API functions, etc. from it ? possible i guess but bearing in mind java works on embedded systems like washing machines and stuff too.. o_O
Title: Re: how long did it took you to understand how to make an win32 program
Post by: Rockoon on August 13, 2009, 10:52:33 PM
Quote from: Slugsnack on August 13, 2009, 10:05:13 PM
so you reckon it detects each system and has hardcoded API functions, etc. from it ? possible i guess but bearing in mind java works on embedded systems like washing machines and stuff too.. o_O

I'm not sure that you understand how the whole thing is architected.

An enterprising individual might define a windowing library for x86 assembly language programmers, and then implement that library for both Linux32 and Win32, in each case the library would make OS-specific calls to accomplish what the library intended (create window, resize window, draw on window, etc..) ..

..with such a cross-platform library in-hand, you can now write a single program which targets both platforms, only needing a recompile on each supported platform.

Please note that Java programs are compiled at runtime, and that before you can run any Java programs you need to have both the java compiler and the java standard library (collectively its called the Java Virtual Machine) implemented and residing on your platform.
Title: Re: how long did it took you to understand how to make an win32 program
Post by: dedndave on August 14, 2009, 01:37:26 AM

        INVOKE  FluffAndFold,
                PERMANENT_PRESS,
                COLOR_FAST,
                LARGE_LOAD,
                ADDR Downey

i used that function in a program just last week   :bg
Title: Re: how long did it took you to understand how to make an win32 program
Post by: redskull on August 14, 2009, 02:24:45 AM
Quote from: dedndave on August 14, 2009, 01:37:26 AM

        INVOKE  FluffAndFold,
                PERMANENT_PRESS,
                COLOR_FAST,
                LARGE_LOAD,
                ADDR Downey

i used that function in a program just last week   :bg

The 'war department' doesn't let me use that function ever since I passed it a null pointer and flooded the basement  :bg

That's no joke, either
Title: Re: how long did it took you to understand how to make an win32 program
Post by: dedndave on August 14, 2009, 04:12:19 AM
how else do you think it communicates with the OS ?
of course it uses api
and, it is multi-platform because it can be built with different lib's
that doesn't mean that a module built to run under windows can run under linux
Title: Re: how long did it took you to understand how to make an win32 program
Post by: Slugsnack on August 14, 2009, 07:26:24 AM
forget what i said i'm an idiot.. got confused with something else lol. they even taught us about this at school..