Signed-off-by: Zhang Shuai wxsxsdz@gmail.com --- include/ntstatus.h | 1 + include/winnt.h | 1 + 2 files changed, 2 insertions(+)
diff --git a/include/ntstatus.h b/include/ntstatus.h index a91ce97731..26b5039539 100644 --- a/include/ntstatus.h +++ b/include/ntstatus.h @@ -22,6 +22,7 @@ #define __WINE_NTSTATUS_H
#ifndef WIN32_NO_STATUS +#define WIN32_NO_STATUS
/* * Exception codes diff --git a/include/winnt.h b/include/winnt.h index d18b2e03b4..0a05f145f4 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -600,6 +600,7 @@ typedef DWORD FLONG; /* Defines */
#ifndef WIN32_NO_STATUS +#define WIN32_NO_STATUS
#define STATUS_WAIT_0 ((DWORD) 0x00000000) #define STATUS_ABANDONED_WAIT_0 ((DWORD) 0x00000080)
Hello, I want to use NT_SUCCESS() to test the return value of some functions, and STATUS_SUCCESS is only defined in ntstatus.h, not in winnt.h (which is in turn included by windef.h). So should we change the headers in this way? So that we can write #include "ntstatus.h" #include "windef.h" then it is possible to use NT_SUCCESS(). Regards, Zhang Shuai.
Zhang Shuai wxsxsdz@gmail.com 于2019年11月22日周五 上午7:03写道:
Signed-off-by: Zhang Shuai wxsxsdz@gmail.com
include/ntstatus.h | 1 + include/winnt.h | 1 + 2 files changed, 2 insertions(+)
diff --git a/include/ntstatus.h b/include/ntstatus.h index a91ce97731..26b5039539 100644 --- a/include/ntstatus.h +++ b/include/ntstatus.h @@ -22,6 +22,7 @@ #define __WINE_NTSTATUS_H
#ifndef WIN32_NO_STATUS +#define WIN32_NO_STATUS
/*
- Exception codes
diff --git a/include/winnt.h b/include/winnt.h index d18b2e03b4..0a05f145f4 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -600,6 +600,7 @@ typedef DWORD FLONG; /* Defines */
#ifndef WIN32_NO_STATUS +#define WIN32_NO_STATUS
#define STATUS_WAIT_0 ((DWORD) 0x00000000)
#define STATUS_ABANDONED_WAIT_0 ((DWORD) 0x00000080)
2.19.1
shuai zhang wxsxsdz@gmail.com writes:
Hello, I want to use NT_SUCCESS() to test the return value of some functions, and STATUS_SUCCESS is only defined in ntstatus.h, not in winnt.h (which is in turn included by windef.h). So should we change the headers in this way? So that we can write #include "ntstatus.h" #include "windef.h" then it is possible to use NT_SUCCESS().
You have to define WIN32_NO_STATUS yourself. That's dumb, but it's the way Microsoft does it.
Ok, thanks for the clarification. It's very helpful!
Alexandre Julliard julliard@winehq.org 于2019年11月22日周五 下午4:08写道:
shuai zhang wxsxsdz@gmail.com writes:
Hello, I want to use NT_SUCCESS() to test the return value of some functions, and STATUS_SUCCESS is only defined in ntstatus.h, not in winnt.h (which is in turn included by windef.h). So should we change the headers in this way? So that we can write #include "ntstatus.h" #include "windef.h" then it is possible to use NT_SUCCESS().
You have to define WIN32_NO_STATUS yourself. That's dumb, but it's the way Microsoft does it.
-- Alexandre Julliard julliard@winehq.org