Directx is not becoming obsolete.
Directx and xna are two different things.
The first is an API, designed for C++, the second is a framework.
The things in the book are usable in xna (with some rebuild for the framework).
If you don't want a framework, and you want to learn from zero, you can use SlimDX.
I think this is usefull.
Davide