Jump to content

  • Log In with Google      Sign In   
  • Create Account

Automation Error ,Err.Number=-2005530516


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Hamada AbdelRahman   Members   -  Reputation: 122

Like
Likes
Like

Posted 18 June 2003 - 08:14 PM

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

Sponsor:

#2 S1CA   Members   -  Reputation: 1400

Like
Likes
Like

Posted 19 June 2003 - 02:18 AM

INVALIDCALL usually means that either a parameter you''ve passed to D3D is invalid or an operation you''ve requested isn''t possible.


The easiest way to find out why a D3D call returned an INVALIDCALL error is to let it tell you:

1) Make sure you''re using the DEBUG version of the D3D runtime is installed (you were given the option when you installed the SDK).

2) Make sure that the DEBUG version of the runtime is enabled. Go to the DirectX applet in the Control Panel and look under the Direct3D tab.

3) Whilst in the DirectX control panel applet, increase the debug output level for Direct3D to maximum.

I''ve not used Visual BASIC for over 10 years so I''ve forgotten what debugging support is available and I don''t have it installed on this machine to check... If VB DOES have a debug output window:

4) Run your program and let it fail with the INVALIDCALL error.

5) Now look at all the text in your debug output window. D3D will log information, warnings, and importantly errors to that. It''ll also explain the reason WHY a D3D call has failed.


If VB doesn''t have a simple debug output window:

4) Download and run DebugView from www.sysinternals.com or use the command line debug viewer that comes with the DirectX SDK

5) Run your program and let it fail with the INVALIDCALL error.

6) Now look at all the text in the debug viewer. D3D will log information, warnings, and importantly errors to that. It''ll also explain the reason WHY a D3D call has failed.



--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

#3 Pinzmon   Members   -  Reputation: 127

Like
Likes
Like

Posted 19 June 2003 - 07:02 PM

If you are using VB.NET, you''ll need to enable unmanaged debugging to get useful error messages. Right click the project, go to the Properties page, and select Configuration properties. Select the Debugging section, and make sure that "enable unmanaged debugging" is set to true.

Hope it helps,
Pinz.

#4 KurtCPP   Members   -  Reputation: 130

Like
Likes
Like

Posted 20 June 2003 - 10:36 AM

I say the only parameter that could be wrong is the D3DPRESENT_PARAMETERS, either D3DSWAPEFFECT_COPY_VSYNC can''t be used here, but I dont think so, or it can be because youve forgotten to initialize a field of the struct (eg hDeviceWindow,BackBufferWidth/Height). Actually, I''m almost sure it comes from this structure.

I hope I''ve been useful.


Prog, Sex & Rock''n''Roll :
I don''t like the Prog but the prog likes me.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS