Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. got lParam, what to do now?

got lParam, what to do now?

Scheduled Pinned Locked Moved C#
question
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lapje
    wrote on last edited by
    #1

    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.

    J A 2 Replies Last reply
    0
    • L Lapje

      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.

      J Offline
      J Offline
      John Fisher
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      • L Lapje

        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.

        A Offline
        A Offline
        Alex Korchemniy
        wrote on last edited by
        #3

        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

        L 1 Reply Last reply
        0
        • A 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

          L Offline
          L Offline
          Lapje
          wrote on last edited by
          #4

          Found a nice sample code: http://blogs.simplifi.com/brucet/downloads/remotecontrolsample.zip It may help some others as well.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups