By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,562 Members | 1,217 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,562 IT Pros & Developers. It's quick & easy.

Device Notify window (RegisterDeviceNotification)

P: n/a
I'm writing a C# application, this application will display a message when
USB device connected/disconnected(removed) , How can I do that ?
I made some research and find something called "RegisterDeviceNotification"
, But don't find how to use it in my C# since I should send to this API
"IntPtr hRecipient", How can I do that ?

[DllImport("user32.dll", SetLastError = true)]
static extern IntPtr RegisterDeviceNotification(IntPtr hRecipient,IntPtr
NotificationFilter, uint Flags);

I saw some example in C++ which do the following :
RegisterDeviceNotification(this->GetSafeHwnd(), &NotificationFilter,

How to do the same in C# ?????????????

Aug 30 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.