How long will my house last?

Well, not forever but how long?
I assume that most houses decay when exposed to moisture. They rot.
But what if I could keep the moisture away. Houses today are built with that in mind.
Will wood last forever if left dry? If not, what process causes it to decay?

World’s oldest wooden building is in Uji, Japan, and is 1000 years old. So barring fire, civil disorder, other force majeure, or urban renewal, the odds are good that it’ll be around for a long time.