CreateDevice Failed.

So I have just recently started into DirectX native programming, and I had my application running without error; but I changed something within the code and now I am having a crash when trying to run the application though no compiler error on compile. Comming to forums have been my last resort, but I can not for the life of me figure out why or what I can do to fix this crash. Below is a link to the related code and the output from the debugger. Any help would be greatly appriciated, thank you in advanced for any insight given.

Related files:
http://www.dev.zetahost.net/public/D3DError.txt

[603 byte] By [AlexLoren] at [2007-12-25]
# 1
It might be that a certain D3D object creation call is failing and your code is not checking for that, and you're just using that object assuming it's valid. So, standard questions apply (tm):

- debug runtime enabled?
- no relevant messages in the debug

output?
- all HRESULTs checked for success?

WessamBahnassi at 2007-9-3 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: DirectX 101...
# 2

Hey

This error usually occurs when this value equals or exceeds the number of display adapters in the system. Now either you have a flaw in your code either you don't specify something correctly. Please use some breakpoints at the point of CreateDevice() invokation and tell us what the varables regarding the function are.

Kindly,

~a.ka. Andr3w

akaAndr3wGrammenos at 2007-9-3 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: DirectX 101...