Tuesday, October 19, 2010 4:07 PM
After DirectX SDK (June 2010) I am still unable to add DX namespaces, e.g. using Microsoft.DirectX. There are no references to Direct X present in .NET or COM reference lists. I should do it manually probably, but I was unable to find a useful guide.
System: Visual Studio 2010 (student license) + Windows 7 64bit.
Thursday, October 21, 2010 3:20 AMModerator
What you'll need to do is:
1. Right-click on References folder, and select "Add Reference..."
2. On the .NET tab, select the "Browse" button.
3. Navigate to where you installed the SDK. (On my machine it is C:\Program Files\Microsoft DirectX 9.0 SDK)
4. The files you are looking for should be in ".\Developer Runtime\x86\DirectX for Managed Code"
5. Select the DLLs that you want (in this case Microsoft.DirectX.dll, Microsoft.DirectX.DirectInput.dll)
Also, to make coding easier, don't forget to add this to the top (General scope, not within a Form or class) of your code:
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
- Marked As Answer by Larcolais GongModerator Tuesday, October 26, 2010 2:09 AM
Saturday, December 04, 2010 3:01 PM
I'm also having this problem with additional issues :
Although this adds the reference for the project it doesn't make the reference available in the .NET tab. And another problem is that although I have made Direct Input available, and my project compiles. It hangs when I call Manager.GetDevices(DeviceType.Keyboard, EnumDevicesFlags.AttachedOnly); The same code does not hang in VS2008Express.