I want to determine when a disc (CD / DVD) or USB is inserted or removed.
I know that I need to work with the WM_DEVICECHANGE message, but my problem is getting the volume (letter) in Drive, I tried to get it using WMI Query and Win32_VolumeChangeEvent too, but I could not!
there is an example and it works great, how can I do this with Delphi?
source share