In my 2D RPG game, I use AsphyreComponents for graphic. It works with Direct3D, but the interface looks like a normal 2D engine. It works with DirectX9c, but you could use software renderer optionally. And the source is included, so you can see how it works.
If you want to write your own 2D engine with direct3D, you need to read many tutorials before starting.

For sound, fmod is very good. It can handle many formats, is fast and very voluminous.(you can also use 3D sound without problems).