@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Summary: The CM_Reenumerate_DevNode_Ex function enumerates the devices identified by a specified device node and all of its children. !!!!C# Signature: [DllImport("setupapi.dll")] static extern UInt32 CM_Reenumerate_DevNode_Ex(UInt32 dnDevInst, UInt32 ulFlags, IntPtr hMachine); !!!!VB Signature: Declare Function CM_Reenumerate_DevNode_Ex Lib "setupapi.dll" (dnDevInst As UInt32, ulFlags As UInt32, hMachine As IntPtr) As UInt32 !!!!User-Defined Types: None. !!!!Alternative Managed API: Do you know one? Please contribute it! !!!!Notes: Please add some! !!!!Tips & Tricks: Please add some! ulFlags: const uint CM_REENUMERATE_NORMAL = 0x00000000; const uint CM_REENUMERATE_SYNCHRONOUS = 0x00000001; // XP and later versions const uint CM_REENUMERATE_RETRY_INSTALLATION = 0x00000002; const uint CM_REENUMERATE_ASYNCHRONOUS = 0x00000004; Result: const uint CR_SUCCESS = 0x00000000; : !!!!Sample Code: Please add some! public bool RescanDevices() { UInt32 devRoot; if(CM_Locate_DevNode_Ex(out devRoot, IntPtr.Zero, 0, IntPtr.Zero) != CR_SUCCESS) return false; if(CM_Reenumerate_DevNode_Ex(devRoot, 0, IntPtr.Zero) != CR_SUCCESS) return false; return true; } Documentation: CM_Reenumerate_DevNode_Ex@msdn on MSDN
Edit setupapi.CM_Reenu...
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.