PC Review


Reply
Thread Tools Rate Thread

Device Notify window (RegisterDeviceNotification)

 
 
=?Utf-8?B?W0pvZV0=?=
Guest
Posts: n/a
 
      30th Aug 2006
Hi,
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,
DEVICE_NOTIFY_WINDOW_HANDLE);

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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
owa should notify outside of browser window Daved Microsoft Outlook Discussion 2 19th Jul 2008 04:00 AM
DB Notify window coming up on shutdown Merryterry Windows XP Help 0 7th Jun 2008 10:15 AM
NOTIFY window to pop-up on a multi-user db =?Utf-8?B?TWFyaWE=?= Microsoft Access 4 14th Sep 2007 04:46 PM
Tool that notify when a new device is plugged into a network =?Utf-8?B?TmljbyBC?= Microsoft Windows 2000 Networking 1 7th May 2005 05:16 PM
Window Messenger does not send a Notify message Henry Windows XP Messenger 0 6th Oct 2003 09:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:55 PM.