There is no way to allow the charging.
When an USB IPhone Connector is connected to USB port of Computer, IPhone installs the Drivers of the same (or ITune Software identifies the Iphone). Until and unless the Drivers can installed or detection takes place the Phone would not be charged. IPhone also carries the HDD within it. So, when you insert the Connector, it detects the HDD as well. (you can see the Iphone HDD in the My Computer option)
However, you need to understand, it would not get charged until the IPhone is detected. And for detection your HDD has to be activated and drivers be installed and a Transfer has to take place (which you do not want.)
Check this
https://www-secure.symantec.com/connect/forums/iphone-charging-block-sep
https://www-secure.symantec.com/connect/forums/charging-has-blocked