问题
I'm trying to compile this C sample (at the bottom of that page) using C++ console app project on VS2010 on a Windows 7 machine but it gives me undeclared identifier errors. I can't find definitions of ITaskSettings3
and IMaintenanceSettings
. You would think Microsoft will provide a code sample that compiles, hah :)
Any idea what includes am I missing?
EDIT: This is what I have in the properties for the project:

回答1:
I was able to compile it with VS 2008 in C++ project, that allowed me to set include directories in the project properties for Configuration Properties -> C/C++ -> Additional Include Directorues. I included these:
"C:\Program Files (x86)\Windows Kits\8.0\Include\shared";"C:\Program Files (x86)\Windows Kits\8.0\Include\um\"
Obviously you need to download and install Windows 8 SDK.
来源:https://stackoverflow.com/questions/16868396/where-to-find-itasksettings3-and-imaintenancesettings-definitions-for-vs2010-c