Direct3D

Could anyone please help me to use the enumerate devices DirectX
function, I have been trying for a long time.
Thanks Gareth