Isn't that what D3DXMatrixRotationQuaternion does?

EDIT:

Ok, I did it! Now I have my engine running with quaternions! Thanks!