How can I open PS/2 port
-
Why do you want to, do you have something other than a mouse or keyboard attached to it? -- -Blake (com/bcdev/blake)
-
Why do you want to, do you have something other than a mouse or keyboard attached to it? -- -Blake (com/bcdev/blake)
-
You still skipped the 'why' part of the question. Is this mouse still supposed to work in Windows while you are spying on it? If so you can't just 'open the port' anyways, as if you are reading from it the operating system can't be reading from it at the same time. If you really need the low level bits coming from the mouse you would have to write a filter driver. To do this, install the DDK and have a look at the sample in src\input\moufiltr. I doubt however that you really need this, and writing drivers is not for the faint of heart. If you are running on XP or later, you should use the Raw Input model. Have a look on MSDN for RegisterRawInputDevice. If you have to support older versions of Windows, you should probably stick with hooks. In that case, have a look on MSDN for SetWindowsHookEx. -Blake
-
You still skipped the 'why' part of the question. Is this mouse still supposed to work in Windows while you are spying on it? If so you can't just 'open the port' anyways, as if you are reading from it the operating system can't be reading from it at the same time. If you really need the low level bits coming from the mouse you would have to write a filter driver. To do this, install the DDK and have a look at the sample in src\input\moufiltr. I doubt however that you really need this, and writing drivers is not for the faint of heart. If you are running on XP or later, you should use the Raw Input model. Have a look on MSDN for RegisterRawInputDevice. If you have to support older versions of Windows, you should probably stick with hooks. In that case, have a look on MSDN for SetWindowsHookEx. -Blake
Hi Blake Coverett thanks for your reply . My english writing is very bad sorry. i want unplug a mouse from computer and turn on it , then after loading the windowsxp , plug in the PS/2 mouse and open it's port and read its data bits . please more help me . I guess that RegisterRawInputDevices can help me , but I can't findout it . If possible for you help me more. :rose::rose::rose: