Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 952931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:58:14+00:00 2026-05-15T23:58:14+00:00

I’m trying to read from an USB HID device, I know how to do

  • 0

I’m trying to read from an USB HID device, I know how to do it in C# using DLLImport hid.dll, but I want to do it from C++, this way I don’t have to declare all the structures, etc, and just include the headers files.

So I downloaded the WDK and then when including the headers files and linking the libraries I’m getting a lot of errors:

#include <windows.h>

extern "C" {
    #include <hidsdi.h>
}

int main(){

}

Errors (6 out of 163):

Error   1   error C2065: 'PASSIVE_LEVEL' : undeclared identifier    c:\winddk\7600.16385.1\inc\api\hidpi.h  302 driver
Error   2   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\winddk\7600.16385.1\inc\api\hidpi.h  303 driver
Error   3   error C2146: syntax error : missing ';' before identifier 'NTSTATUS'    c:\winddk\7600.16385.1\inc\api\hidpi.h  303 driver
Error   4   error C2143: syntax error : missing ';' before '__stdcall'  c:\winddk\7600.16385.1\inc\api\hidpi.h  303 driver
Error   5   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\winddk\7600.16385.1\inc\api\hidpi.h  303 driver
Error   6   error C2377: 'NTSTATUS' : redefinition; typedef cannot be overloaded with any other symbol  c:\winddk\7600.16385.1\inc\api\hidpi.h  303 driver

OK so I read somewhere that I have to upgrade the Windows SDK too, I had the Microsoft Windows SDK v6.0A, I downloaded and installed the windows SDK v7.0. But then looks like I have two SDK now? How I properly do the SDK upgrade in visual studio?

I very much appreciate your help,

Thanks,
Carlos

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T23:58:15+00:00Added an answer on May 15, 2026 at 11:58 pm

    I found a solution, don’t know why this is working, but it is!:

    In Visual Studio go to:

    Tools->Options->Projects->VC++ Directories and then Show directories for: include files.

    Add this folders:

    C:\WinDDK\7600.16385.1\inc\ddk and C:\WinDDK\7600.16385.1\inc\api

    Now here is the trick that solved the problem for me and I don’t know why, because seems odd but here it is:

    C:\WinDDK\7600.16385.1\inc\ddk -> This directory have to be the first directory in the list!

    C:\WinDDK\7600.16385.1\inc\api -> This directory have to be ABOVE “$(WindowsSdkDir)\include” BUT BELOW “$(VCInstallDir)include”

    Example:

    C:\WinDDK\7600.16385.1\inc\ddk
    $(VCInstallDir)include
    $(VCInstallDir)atlmfc\include
    C:\WinDDK\7600.16385.1\inc\api
    $(WindowsSdkDir)\include
    $(FrameworkSDKDir)include
    

    Carlos

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know how can I replace this 2 symbol below from the string
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I want to construct a data frame in an Rcpp function, but when I
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.