Author Topic: Microsoft's WDK  (Read 18791 times)

Dobaz

  • Member
  • ***
  • Posts: 23
Microsoft's WDK
« on: September 30, 2011, 06:32:44 pm »
Hello to all,

first post!  I am about to develop an application which will be used to configure a game controller. The game controller is a joystick so a hid device and we'll be able to change the buttons functions. The application will be used to send configuration commands as well as display what buttons are pressed while the game is running.

Questions:
1- With Microsoft's WDK, does the end user will need to install any driver for my application to work? Is it the best way to go or should I us libusb?

2- When the end user is playing, the joystick will send data to the game application and at same time, I need to display which button has been pushed. How can I read the usb port while the application is doing the same.  Is this possible?

Thanks a lot

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Microsoft's WDK
« Reply #1 on: September 30, 2011, 10:10:01 pm »
I believe a filter driver can do this. You might find some help here:

http://social.msdn.microsoft.com/Forums/en/wdk/

Jan

Dobaz

  • Member
  • ***
  • Posts: 23
Re: Microsoft's WDK
« Reply #2 on: October 03, 2011, 10:25:08 am »
Thank you Jan,

I looked at it and finally got on raw input to read the joystick's and display the buttons pushed real time while the game is running.  It seems simple and reliable.  Only question remaining, is it possible to read the joystick while the game is doing the same. Will the data be available or will I experience any kind of interference since two apps need to read the data at the same time?

Thanks again

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Microsoft's WDK
« Reply #3 on: October 03, 2011, 02:21:06 pm »
A filter driver receives the data, changes it if needed, and passes it on.

Jan

Dobaz

  • Member
  • ***
  • Posts: 23
Re: Microsoft's WDK
« Reply #4 on: October 04, 2011, 02:29:57 pm »
Thank you Jan,

I realize I may have mis explain my case. I have two tasks to accomplish in the program:

1- I will send new button configurations to the controller joystick and the joystick will memorize it.  I will use the WDK to do that. No questions here yet.

2- Show real time the commands sent to the game app. I do not have to change the commands coming from the joystick while the game is playing, only show it in real time.  For a newbie, is raw input the fastest/simple way to go?  Is it possible to read the joystick data while the game is doing the same (two apps reading same joystick)?

Thanks

Dobaz

  • Member
  • ***
  • Posts: 23
Re: Microsoft's WDK
« Reply #5 on: October 04, 2011, 09:37:28 pm »
All right, I found the answer in  the FAQ!

Every open handle to the HID has its own report queue. Every report a device sends goes into all of the queues so multiple applications can read the same report.

You answered Jan.  Thanks!

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Microsoft's WDK
« Reply #6 on: October 05, 2011, 10:10:25 am »
I'm glad you found the answer.

Jan