What's with the DWORDs

If don’t know what a DWORD is, good. This is quite geeky so don’t read any further, unless you want to know what wrong with DWORDs.

If you have ever taken a look at windows.h, you know what I am talking about. For some reason Microsoft decided that they need to define every single type themselves, because the original types did not shout enough. VOID is clearly a lot better than void, but what the hell is the reasoning behind LPCSTR? It looks like vomit. I don’t want that my code looks like shouting vomit. What the hell is wrong with ‘const char *’?

The big problem is not that Microsoft re-invented types with this stupid system, but it is a big problem that some so-called professional programmers actually use those wonderful types in code that should be cross-platform. When they realize that their code needs to work on something else than their beloved Windows, they make nice typedefs for linux and others. Only problem here is that everybody has their own idea what DWORD should be defined. This is where the fun starts. There are situations where you might need to include to different headers files, but both of those header files define DWORD differently. Nice.

  • Share/Bookmark

3 Comments

  1. Sami Tikka says:

    Oh yes! Been there. Done that. (= Trying to include 2 incompatible definitions for DWORD)

    Trouble is, I’m visiting the same place next week. *sob*

  2. Latisha says:

    That’s really tikhnnig out of the box. Thanks!

Leave a Reply