![]() ![]() ![]() ![]() |
|||||
|
|||||
樓主 DTO ![]()
![]() |
我上網找過用 http://tedprogramming.blogspot.com/2010/01/c-detectionusbinserthidremove.html 這個的作法偵測USB的插入 然後插入時用 http://stackoverflow.com/questions/3331043/get-list-of-usb-devices 抓取它的VID跟PID 但總是會出現錯誤 「 內容 0x1aaec8 已中斷連接。將不會使用任何 Proxy 對 COM 元件上的要求提供服務。這可能會導致損毀或資料遺失。若要避免這個問題,請確認所有內容/Apartment 是否能保持運作,直到應用程式不再使用 RuntimeCallableWrapper 為止 (它代表在這些內容/Apartment 內部運作的 COM 元件) 。 」 我的程式碼如下: |