No, really, how do you add a reference to DirectX in Visual Basic 2010?

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
If I try to copy/paste simple tutorials such as http://www.riemers.net/eng/Tutorials/DirectX/Visual_Basic/Series1/The_first_triangle.php , Visual Studio freezes indefinitely and I have to force-close it. If I try to use code like the stuff found here
http://www.codesampler.com/usersrc/usersrc_1.htm#dx9vbu_initialization or even just load up Reed Kimbles XArcade Vengance from this forum, I get this error message:
An error occurred creating the form. See Exception.InnerException for details. The error is: Could not load file or assembly Microsoft.DirectX.Direct3D.dll or one of its dependencies. is not a valid Win32 application. (Exception from HRESULT:
0x800700C1)
This is driving me crazy. Since the references dont show up in the .NET or .COM lists by default, nor are they located in the latest DirectX SDK, I know from other threads to visit WindowsMicrosoft.NETDirectX for Managed Code1.0.2902.0 and use
the .DLLs found there. However, adding those references seems to affect nothing; I still get the error above (or freeze my system in the case of simpler tutorials).

I must have looked through 100 topics about this, and the solution almost always seems to be "Switch to XNA" or "Program in C instead." Thats great, and Im sure I will have a look at XNA before too long and may even man up and try to really take
on C++ at some point, but for now Id like to stick with what I at least sort of know and experiment with rendering some images in Visual Basic. But first, I need to figure out how to get VB2010 to recognize DirectX. Does anybody know a solution
to the error Im getting above?

View the full article
 
Back
Top