-1

I see this #define in windows kit 10 SetupAPI.h in line 4871

#define LogSeverity DWORD

So I can't do something like

typedef int LogSeverity

This effectively makes LogSeverity like a reserved keyword if I dont want to redefine DWORD. Am I missing something here?

device_exec
  • 1,686
  • 1
  • 9
  • 7

1 Answers1

0

The windows API has a huge number of such identifiers, what I actually find surprising about this case is that it's a #define and not a typedef. Although with it being a define it does give you the option of #undefing it after the include in question. Although I would likely just accept that it is an already used identifier and choose another name for whatever I was creating.

'Why' questions of this form generally don't have answers, only workarounds.

#include <setupapi.h>
#undef LogSeverity
SoronelHaetir
  • 14,104
  • 1
  • 12
  • 23