Use iPhone to connect desktop to wireless
I think what you're trying to do is called tethering. There are several tethering apps available. They require your iPhone to be jailbroken though. Some apps are PdaNet, TetherMe, and MyWi. 
I know that with MyWi you can connect to the Wireless Network, turn off cellular data in your iPhone, and use it to tether without charges.
-Notice, these apps are all Paid apps on Cydia, but if you're jailbreaking your iPhone there are ways to get the apps for free.