Following to do are:
- Study the pattern of the values returned. If I press a, b and c at the same time, the pattern becomes 00 00 04 05 06 00... If only a is pressed, it is 00 00 04 00 00 ... If only b is pressed, it is 00 00 05 00 00... We should write a "clever" function to analyze it.
- Integrate the getForegroundProcess program with this library.
- Figure out what should be sent to the widget to identify current running process.
The bugs that make the program unable to read and write data:
- I forgot to change the flags and control type respectively.
- To write something, nAccess = GENERIC_WRITE; nsharemode= nShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE; controlType= 0x02... It is similar if we want to read something.
- The overlapped structure is vital for ReadFile to call. It is originally a blocking call. However, we can change its behavior by feeding an overlapped structure to it. Refers to MSDN, the passage about Readfile.
Acknowledgement (HID class only) and some follow-up explanation:
- createFile is called with many arguments. These arguments should also be called from other winAPIs. We have to provide GUID at some points... (refer to the openDev src code in the class HID and also documentation from MSDN)
- Make reference to genericHID.cs and its author. It gives definition of each winAPI function useful for our HID class.
- Also acknowledge to author of the UseHIDSample.cs
No comments:
Post a Comment