|
Question : How to Receive the windows message DBT_DEVICEQUERYREMOVE
|
|
Hi!
Using Visual Basic 2005, how can i receive the windows message dbt_DeviceQueryRemove?
http://msdn2.microsoft.com/en-us/library/aa363206.aspx
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message) MyBase.WndProc(m)
If m.Msg = WM_DEVICECHANGE Then Select Case m.WParam.ToInt32 Case DBT_DEVICEARRIVAL RaiseEvent OnDeviceArrival(GetDriveLetter(m)) Case DBT_DEVICEQUERYREMOVE MsgBox("Yes!!!") Case DBT_DEVICEREMOVECOMPLETE RaiseEvent OnDeviceRemove(GetDriveLetter(m)) End Select End If
End Sub
The above code does not fire DBT_DEVICEQUERYREMOVE...
Jack
Note: Please don't post any C# code. Can't understand it. :)
|
|
Answer : How to Receive the windows message DBT_DEVICEQUERYREMOVE
|
|
|
|
|