1
votes

I'm trying to build a VS 2008 project written by someone else who is currently AWOL in VS2010. I need help with the WinDDK includes, particularly with hidsdi.h.

I've installed the WinDDK and VS2010 on a clean install of Win7. In Properties -> VC++ Directories -> Include Directories, I have added C:\WinDDK\7600.16385.1\inc\api, as well as \ddk and \crt. In Properties -> VC++ Directories -> Library Directories, I have added C:\WinDDK\7600.16385.1\lib\win7\i386.

However, when I attempt to build the project, I get repeated instances of "error C3861: 'HidD_SetOutputReport': identifier not found" and "error C3861: 'HidD_GetInputReport': identifier not found

I opened up hidsdh.h from the following code block:

extern "C" 
{
#include "setupapi.h" 
#include "hidsdi.h" 
}

And the functions listed in the error reports are present within the header file in question. Clearly, I'm doing something wrong with the include paths. Some assistance would be greatly appreciated.

1

1 Answers

1
votes

You must not be defining NTDDI_VERSION or you're not defining it correctly. As you can see in hidsdi.h, the definition of HidD_SetOutputReport is conditional on this:

#if (NTDDI_VERSION >= NTDDI_WINXP) 

NTDDI_VERSION determines what versions of Windows you're going to support. The appropriate values can be found here.