This isn't really an issue, but more that I felt I should share my experience in hopes that it might save other people several hours of trying to make sense of Windows header files should they find themselves in a similar scenario.
By default you can't include phnt in ATL projects because of various header conflicts, such as missing declarations, etc.
So to get them to play nice, all you have to do is:
Comment out or remove the #define CINTERFACE lines in phnt_windows.h. ATL doesn't like CINTERFACE declarations for COM objects apparently.
Put #include <cguid.h>before you include atlbase.h. This is due to INITGUID being defined by phnt, which causes it to get excluded, but it has has some GUID declarations that ATL depends on like GUID_NULL which are only available as externs in this file.
Anyway, I hope this will help someone. I'm going to just close this issue since there's no problem with phnt. Thanks for your efforts~ :upside_down_face:
This isn't really an issue, but more that I felt I should share my experience in hopes that it might save other people several hours of trying to make sense of Windows header files should they find themselves in a similar scenario.
By default you can't include phnt in ATL projects because of various header conflicts, such as missing declarations, etc.
So to get them to play nice, all you have to do is:
#define CINTERFACE
lines inphnt_windows.h
. ATL doesn't like CINTERFACE declarations for COM objects apparently.#include <cguid.h>
before you includeatlbase.h
. This is due toINITGUID
being defined by phnt, which causes it to get excluded, but it has has some GUID declarations that ATL depends on likeGUID_NULL
which are only available asextern
s in this file.Anyway, I hope this will help someone. I'm going to just close this issue since there's no problem with phnt. Thanks for your efforts~ :upside_down_face: