2011-02-05 26 views

回答

0

你可以使用P /與SHChangeNotifyRegister函數調用:

[DllImport("shell32.dll", SetLastError=true, EntryPoint="#2", CharSet=CharSet.Auto)] 
static extern UInt32 SHChangeNotifyRegister(
      IntPtr hWnd, 
      SHCNF fSources, 
      SHCNE fEvents, 
      uint wMsg, 
      int cEntries, 
      ref SHChangeNotifyEntry pFsne); 

您可以監聽SHCNE_MEDIAINSERTED事件,但只要檢測到它是什麼類型的介質中,我真的不知道,但有可能另一個外部函數,您可以調用以獲取該信息。

相關問題