# Problems with DirectX



## LEHS_Guy (Apr 12, 2005)

My Computer Science class is working with Managed DirectX 9.0 in an attempt to learn game programming. However, we've encountered numerous problems with DirectX...whenever we try to compile and execute we get an "unhandled exception of type 
'Microsoft.DirectX.Direct3D.InvalidCallException' occurred in microsoft.directx.direct3d.dll" 
when we try to instantiate a new device object:

public void InitializeGraphics()
{
PresentParameters presentParams = new PresentParameters();
presentParams.Windowed = true;
presentParams.SwapEffect = SwapEffect.Discard;

device = new Device(0,DeviceType.Hardware, this,
CreateFlags.SoftwareVertexProcessing, presentParams);
}

The whole class is very unfamiliar with anything DirectX so we turned to the net. We've tried re-installing a clean OS(Windows 2000 Professional)...re-installing Visual Studio.Net 2003..and DirextX 9 SDK Update (Summer 2003) and it would work. Then when we proceeded to install windows updates it died on us. So we then backtracked through all the hotfixes and it still didn't work. So we re-installed the OS, VS.NET, and DX 9, and after that it wasn't working again! Anyone have the slightest clue whats wrong?


----------



## whodat (Mar 13, 2005)

have a student copy of xp around? :smooch: 
but anyway, do a decent virus and antispy check. post a hyjack log. :sayyes: 
for the hell of it, clear your cmos after you do a restore.. :tongue:


----------

