got lParam, what to do now?
-
Hi, I'm trying to read the input of my IR Controller by raw input. I managed to get lParam (pointer) and some other variables out of it, and now I want to extract it to useable data. I'm now able to make a difference between WM_INPUT of some other type, but there are like 10 keys on the remote using WM_INPUT. lParam seems the only parameter containing the info I need... Thanks in advance.
-
Hi, I'm trying to read the input of my IR Controller by raw input. I managed to get lParam (pointer) and some other variables out of it, and now I want to extract it to useable data. I'm now able to make a difference between WM_INPUT of some other type, but there are like 10 keys on the remote using WM_INPUT. lParam seems the only parameter containing the info I need... Thanks in advance.
It sounds like you'll need to use some of the P/Invoke techniques. Look in the System.Runtime.InteropServices.Marshal class for some methods that you might need for handling the memory. Also, you will probably need to create a struct (marked with StructLayout(LayoutKind.Sequential)) that exactly matches the structure which your lParam is pointing to. Read up on the P/Invoke stuff (Platform Invoke), and you'll probably fill in the important gaps in your understanding. John
"You said a whole sentence with no words in it, and I understood you!" -- my wife as she cries about slowly becoming a geek. -
Hi, I'm trying to read the input of my IR Controller by raw input. I managed to get lParam (pointer) and some other variables out of it, and now I want to extract it to useable data. I'm now able to make a difference between WM_INPUT of some other type, but there are like 10 keys on the remote using WM_INPUT. lParam seems the only parameter containing the info I need... Thanks in advance.
MSDN is your best friend in this case. According to MSDN, lparam is a "Handle to the RAWINPUT structure that contains the raw input from the device". Dig deeper here is the article on the structure: MSDN: RAWINPUT structure[^] Alex Korchemniy
-
MSDN is your best friend in this case. According to MSDN, lparam is a "Handle to the RAWINPUT structure that contains the raw input from the device". Dig deeper here is the article on the structure: MSDN: RAWINPUT structure[^] Alex Korchemniy
Found a nice sample code: http://blogs.simplifi.com/brucet/downloads/remotecontrolsample.zip It may help some others as well.