MinGW-w64 and the NT native APIs

So with the move to 64bits it was necessary to update my development environment moving from the now ancient MinGW tool set to the newer and 64bit supporting MinGW-w64. It was not entirely a smooth transition however, there were numerous differences between the two run-time libraries which had to be resolved.

There was one outstanding problem which could not be easily resolved. In MinGW-w64, the driver development kit headers (ddk\ntdkk.h, ddk\ntapi.h) , which I was previously using to access the NT native APIs, are not compatible with the standard win32 headers. This means, out of the box, there is no way to use the NT native APIs in MinGW-w64. (winternl.h is worthless)

For a while I was forced to make do with the lack of NT native API headers. Use of the Native API was done in the shit way where each project would have to include all of the definitions which they required. At some point I finally got sick of this and thought to myself, surely I am not the only one to have these issues. And that was a new beginning …

After some searching I finally discovered the ReactOS Native Development Kit. This set of headers was specifically designed for use in a win32 project and as such plays nicely with windows.h. A small number of changes were still required to build with MinGW-w64 as there were some definitions that the MinGW-w64 headers already had defined, but it did not take long to remove these from the NDK.

This entry was posted in Uncategorized. Bookmark the permalink.

2 Responses to MinGW-w64 and the NT native APIs

  1. Tyler says:

    So you know about ReactOS project… so are you interesting in joining to help to the only Open Windows out there?

    Or maybe WINE project if you don´t agree with ReactOS?

  2. heashot says:

    It’s nearly impossible to find well-informed people on this subject, but you sound like you
    know what you’re talking about! Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *