How can I load and render an object from a DirectX (.x) file using Direct3D IM?

Sample code would be great.
Thanks!