Original Post
vb Q:
I get error when calling this function,its code is -2005530516 ,and in the dx library err enum this err constant name is (Const D3DERR_INVALIDCALL = -2005530516 (&H8876086C).
I can run any game on my computer, so i guess it''s not the card! Any help appreciated.
''Starts here
Dim Dx As DirectX8
Dim D3d As Direct3D8
Dim D3Ddevice As Direct3DDevice8
Dim bRunning As Boolean
Private Function Initialize() As Boolean
Dim DispMode As D3DDISPLAYMODE
Dim D3Dwindow As D3DPRESENT_PARAMETERS
Set Dx = New DirectX8
Set D3d = Dx.Direct3DCreate
D3d.GetAdapterDisplayMode D3DADAPTER_DEFAULT, DispMode
D3Dwindow.Windowed = 1
D3Dwindow.SwapEffect = D3DSWAPEFFECT_COPY_VSYNC
D3Dwindow.BackBufferFormat = DispMode.Format
Set D3Ddevice = D3d.CreateDevice _
(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, _
Me.hWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, _
D3Dwindow)
Initialize = True
End Function