RE: Accessing Win API
euman at bellsouth.net wrote:
> ----- Original Message -----
> From: "Euler German" <efgerman at myrealbox.com>
>
> > Euman,
> >
> > What about ol' Petzold's Programming Windows 95? Do you think it can
> > help?
> >
> > -- Euler
>
> I have never read the book but I think David started Win32lib by basing
> the code on that book. I think if you ask Derek if he would have done it
> this way he'll tell you no
This is true. I would do it differently now.
> and maybe even David dropping the project
> may be due to the way he started the library and not wanting to go back
> and change everything but, this is just a guess......So, dont base a
> project on
> what you learn from one book!
>
Or one person!
> There are too many lines in Win32lib that make the library redundant,
> over
> sized and slow.."note: I didnt say very slow".
> I dont know enough yet to
> comment on how it shouldve been written but I have ideas.
>
> Anyone who uses Win32lib is stuck in the loop of having code that is
> poor
> in performance, size and bug ridden.
Of course, this is just one person's opinion. Others might disagree
>Currently there are only a handfull of
> people that can write code for Win32lib so your stuck if you have a bug
> creap up.
And that statistic is based on what, exactly?
>Learn to write API from the get-go and you'll be better off in the long
> run. Write your own darn code then you'll feel better about yourself and
> learn
> more, faster...Programs will take many times longer to develop in the
> beginning
> but well worth the time spent researching info either on the net, from
> books or
> the MS-SDK.
>
That is exactly why win32lib and others like it were written. It is
generally a compromise on ease-of-use over performance. If you have a
modern machine, say one manufactured in the last 2-years, the speed
differential is neglible. If one was really trying to write code for
speed, one wouldn't be using Euphoria anyway; assembler code can be an
order of magnitude faster and smaller. (Plus about 1000 times slower to
write.)
If you want to write Windows programming from the ground up, then you
can start with win32lib, but you'd be better served by specific books
that address this area.
It should be noted that most Windows programming is NOT done using the
API directly. C++ users tend to use Microsoft Foundation Classes or
Borland's OWL system, which hides all the API stuff, and of course
Visual Basic and Delphi programmers almost never have to code direct API
calls. Now with C# coming along, we have even less reasons to use direct
API calls.
Check out Masm32 at http://www.movsd.com/masm.htm for really speeding
Windows programs. As Euman says, doing this way it takes more time to
write and debug, but eventually you will get very fast Windows programs.
> I would like to see Win32lib answer what this API means to a program
> seterrmode = define_c_func(kernel32,"SetErrorMode",{C_UINT},C_UINT)
> junk = c_func(seterrmode,{SEM_FAILCRITICALERRORS})
>
> hehe just a joke Derek, Matt, Wolf, David..etc
Sorry, Euman but I don't get it. What joke? According to the MSDN site,
this means :
"The system does not display the critical-error-handler message box.
Instead, the system sends the error to the euman at bellsouth.net. "
--------
Derek.
|
Not Categorized, Please Help
|
|