我试图使一个程序巫婆将通过进程id获取过程的命令行。我正在使用Eclipse C++和Mingw编译器
所以我找到了1个教程该怎么做,它需要 ntstatus ,就像在教程中我包括#include <ntstatus.h>
我添加了代码的第一部分是:
typedef NTSTATUS (NTAPI *_NtQueryInformationProcess)(
HANDLE ProcessHandle,
DWORD ProcessInformationClass,
PVOID ProcessInformation,
DWORD ProcessInformationLength,
PDWORD ReturnLength
);
和即时gettig这3个错误:
expected primary-expression before '__attribute__
Type 'NTSTATUS' could not be resolved
typedef 'NTSTATUS' is initialized (use decltype instead)
在这一行:
typedef NTSTATUS (NTAPI *_NtQueryInformationProcess)(
我用谷歌搜索了这个问题,但我找不到它...
最佳答案
NTSTATUS在
#include <winternl.h>
如
typedef _Return_type_success_(return >= 0) LONG NTSTATUS;
其值在
#include <ntstatus.h>