gpt4 book ai didi

c++ - 无法解析 NTSTATUS

转载 作者:行者123 更新时间:2023-11-30 05:32:10 27 4
gpt4 key购买 nike

我正在尝试制作一个程序,它将通过进程 ID 获取进程的命令行。我正在使用 Eclipse C++ 和 MINGW 编译器

所以我找到了 1 个教程如何做到这一点,它需要 ntstatus 所以就像我在教程中包含的一样 #include <ntstatus.h>

我添加了第一部分代码是什么:

typedef NTSTATUS (NTAPI *_NtQueryInformationProcess)(
HANDLE ProcessHandle,
DWORD ProcessInformationClass,
PVOID ProcessInformation,
DWORD ProcessInformationLength,
PDWORD ReturnLength
);

我得到了这 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>

关于c++ - 无法解析 NTSTATUS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35220101/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com