You should be able to use this as a starting point:
Detecting USB Drive Removal in a C# Program
Detecting USB Drive Removal in a C# Program
Windows will send WM_DEVICECHANGE message to all applications whenever some hardware change occurs, including when a flash drive (or other removable device) is inserted or removed. The WParam parameter of this message contains code which specifies exactly what event occurred.