Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Hamada AbdelRahman

Const D3DERR_INVALIDCALL = -2005530516 (&H8876086C)

This topic is 5484 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 ''The next line is where i get the error! Set D3Ddevice = D3d.CreateDevice _ (D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, _ Me.hWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, _ D3Dwindow) Initialize = True End Function

Share this post


Link to post
Share on other sites
Advertisement
Hi, Buddy!!
I don''t really think I''m gonna be able to help you much since I''m not so fluent with VB, but I''ll all the same try to.

First I ain''t sure your CreateDevice call is correct since in C++ we have to pass in one more parameter than you do; ie the two last params (behind D3DCREATE_VERTEXPR...) should have been D3DWindow, and the address of the device you wanna create but maybe thats just specific to C++), but I thoink the mistake isnt this.

Your certainly already what this error code means : one of the parameters hasnt got a valid value : here it can be either the handle of the window or the D3DPRESENT_PARAMETERS struct. Since there''s can''t be anything wrong with your hWnd, we can deduce the structure hasnt been properly (or completely) initialized.

Then, your problem might come (but I aint totally sure) from one of the following reasons :

1. You haven''t given the right value to the ''hDeviceWindow'' property of your D3DWindow struct. I guess it''s no use telling you that its value gotta be the handle of your window (ie Me.hWnd);

2. You haven''t emptied the structure before initializing it and one the non-blank values might not be edible (just fill it with 0''s in its desclaration or something like that);

3. Try another value for the SwapEffect field (what about D3DSWAPEFFECT_DISCARD for example, just to see what it gives??)

I hope I''ve been useful.

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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!