Error initialize DX (tried SDK, tried different demos)

satanas
04-27-2006, 08:02 PM
I tried lot of demos,like from zbuffer, like SDK for DX9 for VB.NET from microsofts pages..

It gives me ERROR:
Microsoft.DirectX.Direct3D.InvalidCallException was unhandled
ErrorCode=-2146232832
ErrorString="Unknown"
Message="Error in the application."
Source="Microsoft.DirectX.Direct3D"
StackTrace:
at Microsoft.DirectX.Direct3D.Device..ctor(Int32 adapter, DeviceType deviceType, Control renderWindow, CreateFlags behaviorFlags, PresentParameters[] presentationParameters)
at DeviceTutorial.DeviceTutorial.CreateDevice.InitializeGraphics() in C:\DXSDK\Samples\VB.Net\Direct3D\Tutorials\Tutorial1\CreateDevice.vb:l ine 37
at DeviceTutorial.DeviceTutorial.CreateDevice.Main() in C:\DXSDK\Samples\VB.Net\Direct3D\Tutorials\Tutorial1\CreateDevice.vb:l ine 82
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

In CODE (on bold line):
Public Function InitializeGraphics() As Boolean
Dim presentParams As New PresentParameters()
presentParams.Windowed = True
presentParams.SwapEffect = SwapEffect.Discard
device = New Device(0, DeviceType.Hardware, Me, CreateFlags.SoftwareVertexProcessing, presentParams)
End Function

compiled stuff from SDK runs well, but codes won't run anyway... I have
newest dx installed, newest dx for managed code installed (thru win update mgr), and visual basic 2005 express... where is that digged dog? :confused:

Iceplug
04-28-2006, 04:07 PM
What graphics card are you using? Chances are that your graphics card isn't supported by DirectX9 (as it only supports a small list).

satanas
04-28-2006, 04:48 PM
Compiled demos are running fine :) ... so I think there it isn't

Iceplug
04-29-2006, 04:45 AM
So, you're saying that the code doesn't run when you press Start in Visual Studio, but it runs when you click the same project's EXE?

satanas
04-29-2006, 10:00 AM
Yes

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum