Click here to Skip to main content
15,793,452 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
i am using mcHID to interface with USB mouse, i can get Vendor_ID and Product_ID ..etc
what i can't get is the Notify_read.
I can read data only one time when it's plugged.
Is there a solution to get mouse position continuously.
Thank you.

What I have tried:

an Interface using delphi and the mcHID.dll
Updated 18-Feb-16 7:13am
[no name] 18-Feb-16 14:46pm    
Most probably because the OS will be serviced before your Software....?

Have a look here, section "Points Of Interest":
A USB HID Component for C#[^]

1 solution

Why you are using some kind of DLL to access an USB mouse instead of using the Delphi mouse events that use the Windows API?

The mcHID DLL is for accessing USB devices on a low level.

I have not used Delphi so far, but a quick research shows that there is an OnMouseMove event. If you need to get the position anywhere on your screen (OnMouseMove is only called when the mouse is over the window handling it), you can poll the position (e.g. using a timer) and call Mouse.CursorPos.

Quote (from comment posted as solution due to comments not working):
thank you, may be i should explain that i am building a USB Interface with PIC microcontroller to send and receive data, and i am testing the software on my USB mouse.
I noticed that the Notify_Read never sends anything that is why i want to know if the USB mouse does not activate it or what?
many thanks for the reply.
The mouse is probably active (I guess you are using it). But that might be the problem: The events are handled by the Windows driver and are not passed through to the DLL.

I know that the comment option is actually not working. But you can edit your question with the green 'Improve question' link to add the new information there.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900