I have several network drives connected to my PC.
How can my application (VC++/Win32) on this PC, hook or get event when user disconnect drive?
(Right click menu, Disconnect item).
Thank a lot,
Dmitry
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Probably you should have a listener that would catch this event. You can use WNetGetConnection and check for the return code. Here’s the link where you could find details about this method : http://msdn.microsoft.com/en-us/library/aa385453.aspx