Can a plumbing vent pipe be vented horizontally?
You really don't want the vent pipe opening near a window, because of the possibility of the sewer odor coming back into the house. That's why vents are on the roof in the first place &mdash; any breeze quickly carries the odors away.

To answer your specific question, yes, vent pipes can have horizontal runs, as long as there is no possibility of them becoming plugged with water. In other words, any water that gets into the vent pipe opening must be able to run freely all the way to the sewer, without creating a "trap".