flat assembler
Message board for the users of flat assembler.

Index > Heap > why there so many high level apis

Author
Thread Post new topic Reply to topic
asmrox



Joined: 19 Jan 2008
Posts: 160
asmrox
why... Why microsoft made so many dlls.
If i would project my os, i would give only 1 dll with lowlevel functions, and rest for using strings, protocols and gui.
Why threre are Createthread and CreateRemoteThread in kernel32? NtCreateThread in ntdll if for both.
And all functions doing sometyhing with self/remote process. Nt call is 1 for remote, and local. But kernel32? I have to know both, import both, and waste my memory and space for both!
Post 19 Jan 2008, 23:50
View user's profile Send private message Reply with quote
calpol2004



Joined: 16 Dec 2004
Posts: 110
calpol2004
A lot of the API is just redundant crap but what annoys me most is stupid arguments. Like when you call ChangeDisplaySettings. All the OS needs to know is what color depth and the height and width. Nothing more, nothing less. Having to Fill out a DEVMODE structure which is a good 100 bytes long is O.T.T.

Code:
struct DEVMODE
       dmDeviceName           rb 32   ;BYTE   CCHDEVICENAME dup(?)
       dmSpecVersion          dw ?
       dmDriverVersion        dw ?
       dmSize                 dw ?
       dmDriverExtra          dw ?
       dmFields               dd ?
       dmOrientation          dw ?
       dmPaperSize            dw ?
       dmPaperLength          dw ?
       dmPaperWidth           dw ?
       dmScale                dw ?
       dmCopies               dw ?
       dmDefaultSource        dw ?
       dmPrintQuality         dw ?
       dmColor                dw ?
       dmDuplex               dw ?
       dmYResolution          dw ?
       dmTTOption             dw ?
       dmCollate              dw ?
       dmFormName             rb 32 ;BYTE CCHFORMNAME dup (?)
       dmLogPixels            dw ?
       dmBitsPerPel           dd ?
       dmPelsWidth            dd ?
       dmPelsHeight           dd ?
       dmDisplayFlags         dd ?
       dmDisplayFrequency     dd ?
       dmICMMethod            dd ?
       dmICMIntent            dd ?
       dmMediaType            dd ?
       dmDitherType           dd ?
       dmReserved1            dd ?
       dmReserved2            dd ?
ends                        
    


I doubt microsoft care much. using the api is pretty much deprecated. It's all about .NET and all that bloated interpreted poo.[/code]
Post 20 Jan 2008, 00:35
View user's profile Send private message MSN Messenger Reply with quote
asmrox



Joined: 19 Jan 2008
Posts: 160
asmrox
oh yes, dont forget about .NET Wink
wrapper for user32.dll, msvcrt.dll, gdi32.dll and kernel32.dll?

Life would be much easier with only 1 api...
Post 20 Jan 2008, 01:07
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4237
Location: 2018
edfed
with linux, it's worse, there are so many librairies, that i have headake by only reading the list.
win api are part of m$ politic... own the place, because they implement it in their oses, and we cannot delete them.
rundll32.exe please... Wink
Post 20 Jan 2008, 01:33
View user's profile Send private message Visit poster's website Reply with quote
AlexP



Joined: 14 Nov 2007
Posts: 561
Location: Out the window. Yes, that one.
AlexP
they say that with every new version of windows they just pile on more and more junk, like the recent .NET and all the high-level things like Java. One of these days MS is just going to say 'screw it.' and just make a program that generates gigabytes of junk libraries and tosses them randomly into the OS Smile. A four-five gigabyte OS is just not right. And why does the system have to pay by making so many libraries when the compilers are too lazy to call into the API, they need "their own libraries of functions". And better yet, why doesn't everyone just learn assembly and none of this would matter, because someone would make something better and smaller than Windows.
Post 20 Jan 2008, 01:43
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1901
DOS386
> Why microsoft made so many

1. Ask Bill
or
2. Avoid M$

> oh yes, dont forget about .NET wrapper for user32.dll, msvcrt.dll, gdi32.dll and kernel32.dll

Oh thanks Laughing

> with linux, it's worse, there are so many librairies,
> that i have headake by only reading the list.

Me too Sad

> win api are part of m$ politic... own the place, because
> they implement it in their oses, and we cannot delete them.

You indeed can't delete some stupid API (is it really necessary to EnodePointer's ? Confused ) from Windoze ... but you can delete Windoze from your PC at least Idea
Post 20 Jan 2008, 02:24
View user's profile Send private message Reply with quote
Chewy509



Joined: 19 Jun 2003
Posts: 297
Location: Bris-vegas, Australia
Chewy509
On DEVMODE, just remember that the GDI interface is also shared between the printer interface and the visual interface (eg the screen), and while some of those are redundant for the screen, they are critical for print.

My biggest complaint with MS is that they replace secondary APIs/Libraries more often than some people change underwear! OLE, COM+, XML, etc...

While the WIN32 API will still be around for a while, MS has openly stated that .NET is the way forward and eventually WIN32 will be depreciated. (I personally don't see that happening in my lifetime, as even most tools within Vista are still WIN32 API based apps).

However as far as MS is concerned, Assembly programming is dead for Application Development, and hence the push to .NET for anything User-Land-ish.

Even *nix has the same problem with APIs/Libraries, at least they are not replacing APIs/Libraries like the change in the Wind. Sure there are 3+ gfx APIs (QT, GTK, wxWidgets, XLib, FOX, etc), numerous MP3 encoding libraries, the core libraries/API are stable, well tested, and rarely overlapping in functionality.

@AlexP: It's called Vendor Lock-in, and the fact that the WIN32 and other MS provided APIs are not that fantastic, (either lacking features or have ever so subtle bugs).
Post 21 Jan 2008, 01:18
View user's profile Send private message Visit poster's website Reply with quote
asmrox



Joined: 19 Jan 2008
Posts: 160
asmrox
Quote:
Assembly programming is dead for Application Development, and hence the push to .NET for anything User-Land-ish.

Why dead? Maybe its good idea to use .net libs on vista. Assembly will never die! (or maybe untill c will be native language, lol).
Post 21 Jan 2008, 01:52
View user's profile Send private message Reply with quote
drhowarddrfine



Joined: 10 Jul 2007
Posts: 535
drhowarddrfine
Chewy509 wrote:


Even *nix has the same problem with APIs/Libraries, at least they are not replacing APIs/Libraries like the change in the Wind. Sure there are 3+ gfx APIs (QT, GTK, wxWidgets, XLib, FOX, etc), numerous MP3 encoding libraries, the core libraries/API are stable, well tested, and rarely overlapping in functionality.
The items you mention are toolkits, not graphics libraries. They are also 3rd party kits and not part of Unix or Linux. The graphics library is just X, which is really a 3rd party thing too, but those toolkits all write to X.
Post 21 Jan 2008, 04:15
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 can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.