Hi every one. I want to ask a question.

Whenever i plugged a usb in my computer i want to save that time when this happen. Means that i want to save when when a usb is plugged in my pc in a particular day. I want to do it in C. Please help me

Thank you

Recommended Answers

All 2 Replies

I am not sure how helpful this will be but check out this link

Hi every one. I want to ask a question.

Whenever i plugged a usb in my computer i want to save that time when this happen. Means that i want to save when when a usb is plugged in my pc in a particular day. I want to do it in C. Please help me

Thank you

What OS are you using? I know in Linux, the kernel ring buffer is available as /proc/kmsg - and it gives a CPU timestamp when events happen.

If you get a thread which loops through a blocking read, and checks for a USB event on every read, it should give you what you're looking for.

Good luck.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.