You CAN harm your soundcard by connecting direct through a distortion pedal. I blew two soundcards this way. It's safer to use they battery than powering from the mains expecially if you don't know an awfull lot about grounding.
I'm not an expert on this but some soundcards may not be designed for that type of input - I blew one before just by connecting the jack even with the volume on everything turned down (regular Creative Labs) - the line in sent a charge into the soundcard that fried it. A specialist card is fine though, especially if it's designed for taking guitar via 1/4" connection.
Check the forum on the website for whatever soundcard you have just to be sure. Better to be safe than sorry...