I'm currently battling a woodworm prob in my house and I'm treating some of it myself. I can tell you what I've found out since I've been researching this and it might help answer some of your questions...
Woodworm eggs/larvae can only enter through an untreated part of the wood or through an old flight hole. The females lays in the flight holes or the pores of the wood, so they won't get in through a varnished or painted part (assuming it's a paint which coats the wood rather than a stain which soaks in), but apparently they do like the untreated ends of planks of wood for this purpose. They don't have any problem exiting through a varnish or paint when the larvae emerges (this is the bit that makes the hole).
I think it's hard to be sure whether or not the wood is infested until next year's lot emerges, but everything I've read says an active infestation will be marked by the presence of 'frass' (larvae poo, etc.), but I suppose this is only going to be noticeable if the wood has been stationary, and the beasties have only just emerged. That said, they only emerge during a short 2-4 week season in any year, my lot started flying around about six weeks ago. I don't know how long you've had the wood out, but have you seen any flying beatles around since? I don't know whether the season varies depending on where you are ut I am in the North West of Scotland. There are about six different kinds of woodworm, but they're all beetles and mine were small (2-4mm), dark brown, about the shape of a chocolate brazil nut, and stupid - very easy to catch when they weren't flying. The Rentokil UK site has some info on identifying the different types ifyou've seen anything.
Now, the good thing is, whether you're infested or not it'll be quite easy to treat your planks at least. You can buy aerosol tins of stuff made by Rentokil (I think Cuprinol make some too) which you spray on and which will kill the eggs, larvae or adult beetles and stop the wood from being reinfested. Now, it soaks right into untreated wood, but if your wood is varnished or painted it comes with a wee injector nozzle which you poke into the flight holes and it scoots in right into the wood by way of the tunnels the little bastards have made when they were chewing their way through. The tins come in at about a fiver each and the injection part is really quite good fun.
How did it get there? Can't be sure, but as far as I know, these things naturally live outdoors and just tend to fly into houses in their adult stage. Apparently they like certain conditions and if the temperature or moisture level is't right the infestation can die off naturally. Mine have been thriving in a seriously damp part in the back porch of my house.
Lastly, they work quite slowly, so your wood is probably safe enough to use. Check your loft though!
Oops. I've written an essay. Anyway, hope this helps a bit.
K***