In order to overcome this error you will need to uninstall Samsung Kies using its own installer and use CCLeaner to clean the registry files. Once you finish this process you can proceed to install Kies again. I recommend on using a USB cable shorter than 1 meter because everything that is longer than 1 meter will give you errors as you will need to power supply that cable for required voltages. Once you do this, your phone will be recognized and you can then use it accordingly.