Skip to content

Commit

Permalink
Prevent enum clash when using Windows SDK v8.0
Browse files Browse the repository at this point in the history
ProcessDebugPort and ProcessImageFileName are defined in PROCESSINFOCLASS in winternl.h - use the same workaround as ProcessBasicInformation, with underscores and #defines.
  • Loading branch information
stevenwinfield committed Aug 21, 2015
1 parent 3e5aa8a commit e251555
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions psutil/arch/windows/ntextapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ typedef enum _PROCESSINFOCLASS2 {
ProcessTimes,
ProcessBasePriority,
ProcessRaisePriority,
ProcessDebugPort,
_ProcessDebugPort,
ProcessExceptionPort,
ProcessAccessToken,
ProcessLdtInformation,
Expand All @@ -207,7 +207,7 @@ typedef enum _PROCESSINFOCLASS2 {
ProcessForegroundInformation,
_ProcessWow64Information,
/* added after XP+ */
ProcessImageFileName,
_ProcessImageFileName,
ProcessLUIDDeviceMapsEnabled,
ProcessBreakOnTermination,
ProcessDebugObjectHandle,
Expand All @@ -224,5 +224,7 @@ typedef enum _PROCESSINFOCLASS2 {
#define PROCESSINFOCLASS PROCESSINFOCLASS2
#define ProcessBasicInformation _ProcessBasicInformation
#define ProcessWow64Information _ProcessWow64Information
#define ProcessDebugPort _ProcessDebugPort
#define ProcessImageFileName _ProcessImageFileName

#endif // __NTEXTAPI_H__

0 comments on commit e251555

Please sign in to comment.