Windows线程池&x27;PTP#u回调#u实例';:未声明的标识符 VC6.0,Win 10,C++ + < /P>

Windows线程池&x27;PTP#u回调#u实例';:未声明的标识符 VC6.0,Win 10,C++ + < /P>,c++,c,windows,winapi,C++,C,Windows,Winapi,当我声明线程池回调函数时 VOID CALLBACK ProcessHook(PTP_CALLBACK_INSTANCE instance, PVOID lParam); 我编译它并得到一个错误 错误C2065:“PTP_回调_实例”:未声明的标识符 我已经包括了Windows.h 代码 #include <Windows.h> #include <stdio.h> VOID CALLBACK ProcessHook(PTP_CALLBACK_INSTANCE i

当我声明线程池回调函数时

VOID CALLBACK ProcessHook(PTP_CALLBACK_INSTANCE instance, PVOID lParam);
我编译它并得到一个错误

错误C2065:“PTP_回调_实例”:未声明的标识符

我已经包括了
Windows.h

代码

 #include <Windows.h>
 #include <stdio.h>
 VOID CALLBACK ProcessHook(PTP_CALLBACK_INSTANCE instance, PVOID lParam);   
    c:\users\jasey\windows-program\keyboardhook\keyboardhook.h(33) : 
    error C2065: 'PTP_CALLBACK_INSTANCE' : undeclared identifier
    c:\users\jasey\windows-program\keyboardhook\keyboardhook.h(33) : 
    error C2146: syntax error : missing ')' before identifier 'instance'
    c:\users\jasey\windows-program\keyboardhook\keyboardhook.h(33) : warning C4229: anachronism used : modifiers on data are ignored

您可以从下载Windows SDK,然后安装或安装它

从维基:

<> > > Windows .h <强>是C和C++编程语言的Windows特定的头文件,其中包含所有的声明 Windows API中的函数,Windows使用的所有常用宏 程序员,以及各种函数和 子系统

如果安装了17134的SDK版本,可以在以下路径下找到它:C:\Program Files(x86)\Windows Kits\10\Include\10.0.17134.0\um

这里SDK代表Windows软件开发工具包。例如,安装后,您将在“控制面板\程序\程序和功能”中看到“Windows软件开发工具包Windows 10.0.17134.12”


Windows SDK提供头文件(如Windows.h)、库和工具来帮助您开发Windows应用程序。

您似乎没有安装正确的Win SDK。你为什么要使用20年前的非常旧的VC 6.0?我读过windows文档,上面说只需要
windows.h
。SDK的名称是什么?使用VC6.0,因为它很简单~明白!谢谢