By default, the Direct3D system is allowed to write to the depth buffer. Most applications will leave writing to the depth buffer enabled, but there are some special effects that can be achieved by not allowing the Direct3D system to write to the depth buffer.
You can disable depth buffer writes by calling the IDirect3DDevice3::SetRenderState method with the dwRenderStateType parameter set to D3DRENDERSTATE_ZWRITEENABLE and the dwRenderState parameter should be set to 0.