BOOLEAN
SetupDiCancelDriverInfoSearch(
IN HDEVINFO DeviceInfoSet
);
SetupDiCancelDriverInfoSearch cancels a driver list search that is currently underway in a different thread.
If a driver list search is underway for the specified device information set when this function is called, the search is terminated. SetupDiCancelDriverInfoSearch returns TRUE when the termination is confirmed. Otherwise it returns FALSE and a call to GetLastError returns ERROR_INVALID_HANDLE.
SetupDiCancelDriverInfoSearch is a synchronous call; therefore, it does not return until the driver search thread responds to the termination request.