working on article for kinect code!

Topics: Announcements
Sep 9, 2013 at 9:45 PM
Edited Sep 9, 2013 at 9:50 PM
I will work on an article describing the Kinect code in the TechNet wiki but it may not be until November when I actually get it up for people to see. Hope you have not given up on me! I will continue work on this project around late September early October so in the next week or two please pay attention coming back daily for any new information.

Things to work on:
  1. figure out why the ATL c++ code will not create safearray's correctly from data given in visual basic.
  2. What's wrong with the visual basic code not creating a variant of safearrays?
If someone on the team could figure out the above you will have a simple full working example besides the necessary finishing touch's for your customized environment.

Note: the c++ code does create the mouse devices same as visual basic except it can only create 4 devices at the moment and that's it.
Sep 10, 2013 at 10:50 AM
hi jeffman1,

I tried "softhidreceiver dll c++ code" and I can't make it work. I think there is something missing in the code:

hr = piPort->HotPlug( reinterpret_cast<DSFDevice*>(piDSFDevice) ); returns NOT_IMPL.

Also, I tried the C++ code to create the mouse devices. Can you explain to to use it?

best,

row_58
Sep 12, 2013 at 3:38 PM
Funny it works on my PC. You need to try running it on a 64-bit computer. Please try checking that you have wdk 7.1 installed it has the sources for development with this project. In addition, you need to regsvr the softhidreceiver dll source code I have uploaded and unregister the original softhidreceiver dll under program files after you have installed dsf.
Sorry for keeping you waiting but try the above before responding back.
Sep 13, 2013 at 10:06 AM
Thanks for your answer!

I have wdk 7.1 installed. I had to add some method prototypes to IDL file like:

HRESULT QueueAutoInputReports();
HRESULT CreateReportDescriptor();
HRESULT CreateHIDDescriptor();

My fault was that I didn't unregister the original softhidreceiver. Also I was generating softhidreceiver.dll as a x86 project. Now it works fine as x64.

I have another question. How do you receive HID reports?

Best,

row_58
Sep 13, 2013 at 2:21 PM
You can use x86 you just have to recompile the code and add the correct references to the files I only have 64-bit lib and tlb files included with my c++ version of the emulator. I send HID reports but I have not wrote any code for receiving them yet but since its a device you can detect in managed code whether its plugged in and response to other events such as mouse click. For receiving, you need to add an out endpoint from what I understand because that helps. out endpoint is for outputting the data or information and in endpoint is for information input I hope I do not have them backwards. Lets see to receive them you need hclient app and usbview for viewing report descriptors from the wdk. just compile usbview and it will show your device descriptors. If you want to send input Iam still working on that code. You can try the c++ version or vb.net version. But in c++ I think Iam trying to pass an array of bytes that represent the x,y coordinates and left click to the simulated mouse device. If you get that working then its just a matter of modifying the bytes to be bigger for more data later to send to a customized device.
Note: mouse devices should only be able to send input not output any information.