setupdi - Errors
===

I'm getting invalid parameter error in the below code :

> if(!SetupDiSetDeviceRegistryProperty(DeviceInfoSet,
> 			&DeviceInfoData, 			SPDRP_HARDWAREID, 			(LPBYTE)HardwareId,
> 			(lstrlen(HardwareId)+1+1)*sizeof(TCHAR)))  		{
> 			DisplayError(_T("SetDeviceRegistryProperty")); 			break; 		}


and here "SetupDiGetSelectedDriver Failed:  FAILURE: (0xe0000203)" as error in below call.

> if ( !SetupDiGetSelectedDriver(hdi, pdevData, &drvData)) {
> 		DisplayError(_T("SetupDiGetSelectedDriver Failed: ")); 	}


Please give me some idea to solve this.