| 1 |
#ifndef WINTERNL_COMPAT_H |
| 2 |
#define WINTERNL_COMPAT_H |
| 3 |
|
| 4 |
/* |
| 5 |
* winternl.h is not included in MinGW, which was shipped with the 32-bit |
| 6 |
* Windows version of GHC prior to the 7.10.3 release. |
| 7 |
*/ |
| 8 |
#if defined(x86_64_HOST_ARCH) || \ |
| 9 |
__GLASGOW_HASKELL__ >= 711 || \ |
| 10 |
(__GLASGOW_HASKELL__ == 710 && \ |
| 11 |
defined(__GLASGOW_HASKELL_PATCHLEVEL1__) && \ |
| 12 |
__GLASGOW_HASKELL_PATCHLEVEL1__ >= 2) |
| 13 |
# include <winternl.h> |
| 14 |
#else |
| 15 |
// Some declarations from winternl.h that we need |
| 16 |
# include <windows.h> |
| 17 |
|
| 18 |
typedef LONG NTSTATUS; |
| 19 |
|
| 20 |
typedef struct _UNICODE_STRING { |
| 21 |
USHORT Length; |
| 22 |
USHORT MaximumLength; |
| 23 |
PWSTR Buffer; |
| 24 |
} UNICODE_STRING; |
| 25 |
|
| 26 |
typedef struct _OBJECT_NAME_INFORMATION { |
| 27 |
UNICODE_STRING Name; |
| 28 |
} OBJECT_NAME_INFORMATION; |
| 29 |
#endif |
| 30 |
|
| 31 |
#endif /* WINTERNL_COMPAT_H */ |