2011-02-05 34 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事件,但只要检测到它是什么类型的介质中,我真的不知道,但有可能另一个外部函数,您可以调用以获取该信息。

相关问题