views:

139

answers:

1

The Windows APIs don't seem to me to be as straight forward as you might expect. To me, they are somewhat convoluted fashion?

Is this is an effect of keeping backwards compatibility?

Is Microsoft's main goal to push developers to higher level abstractions like ATL/MFC, VB, and/or .net?

It's my first time using the Win32 API and calls like FindFirstFile are making me a firm believer in the UNIX philosophy where the APIs seem to accomplish 90% of the flexibility at 10% of the effort. Then again there seems to be some unique cases that warrant using calls such as fcntl on *nix type machines where they'd be integral to the actual call on Windows.

... or am I just missing a fundamental paradigm?

+3  A: 

A few things to keep in mind:

  1. It was designed about 20 years ago, and was largely based on earlier versions of Windows which were designed a decade before that.

  2. It's based on C, so a GetString() function will needs to have a design like

    bool GetString( char* stringBuffer, int bufferLen)
    

    instead of the

    char* GetString(void)
    

    that any other language would have.

  3. Backwards compatability is job 1 with this API, because every line of Windows code Microsoft owns is built on top of the Windows API
John MacIntyre