I'm new in DirectX, just starting now, and i'm following the code that i see
in books. I'm trying to use a code from a book but i get an error message
that i can't solve (and it souldn't be appening)
whenever i click the button1 i get an error message in the following line of
code:
For i = 0 To Microsoft.DirectX.Direct3D.Manager.Adapters.Count - 1
i get this error message (error message has been translated to English)
DLL
'C:\WINDOWS\assembly\GAC\Microsoft.DirectX\1.0.2902.0__31bf3856ad364e35\Microsoft.DirectX.dll'
is trying the execution managed inside the blockade of the Shipment Program
of the SO. Do not try to execute the code managed inside DllMain or an image
initialization function, because that might make the application to be
suspended.
my source code is this
Public Class Form1
Dim ObjDirect3DDevice As Microsoft.DirectX.Direct3D.Device
Private Sub ListAdapters()
Dim i As Integer
Dim AdapterInfo As Microsoft.DirectX.Direct3D.AdapterDetails
For i = 0 To Microsoft.DirectX.Direct3D.Manager.Adapters.Count - 1
AdapterInfo =
Microsoft.DirectX.Direct3D.Manager.Adapters(i).Information
lstAdapters.Items.Add(AdapterInfo.Description)
Next
lstAdapters.SelectedIndex = 0
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
ListAdapters()
End Sub
End Class
Can you help me?
My thanks in advanced
Archived from group: microsoft>public>vb>directx