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 / C++ / MFC
  4. Need some help immediately

Need some help immediately

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
9 Posts 4 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.
  • A Offline
    A Offline
    anuhoho
    wrote on last edited by
    #1

    Hi Can a dll have a message loop. I want to make a dll which can capture the key pressed event on a device and start doing something. Can anybody help me with some sample code as to how do that. Suppose i being the user have pressed the switched off button on the mobile(Windows Mobile) and my dll is working in the background . So how can i make my dll aware that a key has been pressed and I have to do something according to the pressed key. Thanks in advance!!!!!!!!!!!!

    R L 2 Replies Last reply
    0
    • A anuhoho

      Hi Can a dll have a message loop. I want to make a dll which can capture the key pressed event on a device and start doing something. Can anybody help me with some sample code as to how do that. Suppose i being the user have pressed the switched off button on the mobile(Windows Mobile) and my dll is working in the background . So how can i make my dll aware that a key has been pressed and I have to do something according to the pressed key. Thanks in advance!!!!!!!!!!!!

      R Offline
      R Offline
      Rajesh R Subramanian
      wrote on last edited by
      #2

      You'll need to install a keyboard hook for that. However, post your query in the mobile development forum[^] as people there may be able to help you with more details.

      “Follow your bliss.” – Joseph Campbell

      A 1 Reply Last reply
      0
      • R Rajesh R Subramanian

        You'll need to install a keyboard hook for that. However, post your query in the mobile development forum[^] as people there may be able to help you with more details.

        “Follow your bliss.” – Joseph Campbell

        A Offline
        A Offline
        anuhoho
        wrote on last edited by
        #3

        Can you help me with some code as I am not very aware of this keyboard hook.

        M 1 Reply Last reply
        0
        • A anuhoho

          Can you help me with some code as I am not very aware of this keyboard hook.

          M Offline
          M Offline
          MANISH RASTOGI
          wrote on last edited by
          #4

          KeyBoard Hooks[^]

          1 Reply Last reply
          0
          • A anuhoho

            Hi Can a dll have a message loop. I want to make a dll which can capture the key pressed event on a device and start doing something. Can anybody help me with some sample code as to how do that. Suppose i being the user have pressed the switched off button on the mobile(Windows Mobile) and my dll is working in the background . So how can i make my dll aware that a key has been pressed and I have to do something according to the pressed key. Thanks in advance!!!!!!!!!!!!

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            anuhoho wrote:

            and my dll is working in the background

            You need to understand that a dll cannot work independently, it is merely a library of subroutines called by an executable program.

            txtspeak is the realm of 9 year old children, not developers. Christian Graus

            A 1 Reply Last reply
            0
            • L Lost User

              anuhoho wrote:

              and my dll is working in the background

              You need to understand that a dll cannot work independently, it is merely a library of subroutines called by an executable program.

              txtspeak is the realm of 9 year old children, not developers. Christian Graus

              A Offline
              A Offline
              anuhoho
              wrote on last edited by
              #6

              My problem is my dll is getting attached to one of the processes which I dont know so its difficult for me to trace.Is there some solution or remedy to my problem

              L 1 Reply Last reply
              0
              • A anuhoho

                My problem is my dll is getting attached to one of the processes which I dont know so its difficult for me to trace.Is there some solution or remedy to my problem

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #7

                anuhoho wrote:

                Is there some solution or remedy to my problem

                The only thing that comes to mind is that your design needs reviewing. I have no idea what your dll is supposed to do, but if it is necessary for it to know when the system is being shut down then I suspect it contains some functionality that does not belong in a dll.

                txtspeak is the realm of 9 year old children, not developers. Christian Graus

                A 1 Reply Last reply
                0
                • L Lost User

                  anuhoho wrote:

                  Is there some solution or remedy to my problem

                  The only thing that comes to mind is that your design needs reviewing. I have no idea what your dll is supposed to do, but if it is necessary for it to know when the system is being shut down then I suspect it contains some functionality that does not belong in a dll.

                  txtspeak is the realm of 9 year old children, not developers. Christian Graus

                  A Offline
                  A Offline
                  anuhoho
                  wrote on last edited by
                  #8

                  Let me explain a bit what i am doing. We have a MapiRule example in one of the SDks(Windows MObile 6.0 SDK)where we are setting a rule of collecting the sms somewhere else apart from the default inbox.. This is the application which I am modifying a bit. Now when I install this dll in the device its get attached to one of the process(of which I have no idea)and starts working at the background. Now I want that this dll which is running at the background should be able to get a keymessage event(or a stylus event) and do something...but Suppose I am switching the device off then i want that a message box will pop up..something of that sort. Now if you got some idea will you be able to help me out. Thanks in advance!!!

                  L 1 Reply Last reply
                  0
                  • A anuhoho

                    Let me explain a bit what i am doing. We have a MapiRule example in one of the SDks(Windows MObile 6.0 SDK)where we are setting a rule of collecting the sms somewhere else apart from the default inbox.. This is the application which I am modifying a bit. Now when I install this dll in the device its get attached to one of the process(of which I have no idea)and starts working at the background. Now I want that this dll which is running at the background should be able to get a keymessage event(or a stylus event) and do something...but Suppose I am switching the device off then i want that a message box will pop up..something of that sort. Now if you got some idea will you be able to help me out. Thanks in advance!!!

                    L Offline
                    L Offline
                    Lost User
                    wrote on last edited by
                    #9

                    anuhoho wrote:

                    Now when I install this dll in the device its get attached to one of the process(of which I have no idea)and starts working at the background.

                    That would seem to be the first issue you need to resolve. If you do not know who is using your library then how can you expect to control it? As I said before, your design needs to be looked. This functionality belongs in an application not in a dll.

                    txtspeak is the realm of 9 year old children, not developers. Christian Graus

                    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