Is there a device to control the current in a solenoid
One way to do this is to substitute current measurement for math in the micro.  Yes, this is possible.  I've got a patent on a PFC technique where there is no current feedback and actually no current measurement at all.

If you know the supply voltage or can measure it and know the solenoid inductance and resistance, you can compute how much current is built up in the solenoid as a function of the pulse on time.  In the same way, you can compute the current decrease during the off time.  Then flip around those equations and compute the PWM duty cycle to get the desired current.

Think of a switching power supply as delivering a controlled amount of charge each pulse.  Since current is charge per time, you can control the current by controlling the pulse size and/or the pulse frequency.

Another simpler way is to just look at average voltage.  Solenoids have significant coil resistance in addition to the coil inductance.  The voltages to operate the solenoid at are usually well specified, and you know the current won't be excessive at those voltages.  In a buck converter run in continuous mode, the output voltage is basically just the input voltage times the PWM duty cycle fraction.

One of my current projects is using the voltage control method right now, and it's working very nicely.  The circuit uses a micro to control a solenoid-driven gas value to regulate the output pressure.  This company makes these gas valves with a variety of solenoids to fit different voltage requirements.  They originally thought they'd offer the pressure controller product in the same set of voltage range flavors as the valves.  I pointed out this was not necessary.  Use the valve flavor rated for the lowest voltage and I'll take care of the rest by measuring the customer's supply voltage and adjusting the PWM duty cycle accordingly.  This adjustment is done at a lower level to keep the solenoid drive constant as the supply voltage is varied.  Higher levels perform the control to keep the output gas pressure constant.  As a result of this, they can offer a single pressure controller that works over the full range of voltages they currently have several flavors of solenoids to cover.  All this takes very little additional CPU power.  I'm running the Microchip dsPIC controlling all this at well below its maximum clock rate because the cycles just aren't needed and it lowers the power the end customer has to supply.