Sign in to follow this  
UnionJack72

Where is XInput ??

Recommended Posts

Hi guys, Correct me if I'm wrong but "XInput" is part of the DirectX SDK (Aug 2009)? I'm working on a .NET C# WinForms project, and I need to get my Xbox 360 controller working. Now I know the controller is installed and functioning correctly, so that's not the problem. I have DirectX SDK (Aug 2009) installed in the default location, and in Visual Studio (2008 Pro) I can add references to: "using Microsoft.DirectX" "using Microsoft.DirectX.DirectInput" But where the hell is XInput?? Even the Microsoft website says XInput is part of the Aug 2009 SDK: http://msdn.microsoft.com/en-us/library/ee417003(VS.85).aspx And following this example: http://blogs.msdn.com/pstubbs/articles/531008.aspx There's a reference to: using Microsoft.DirectX.XInput; So what am I missing here? Or should I be using something else? I am not creating a game, or require any 3D graphics. I just require XBox 360 controller support. [Edited by - UnionJack72 on February 20, 2010 1:58:51 PM]

Share this post


Link to post
Share on other sites
Managed DirectX is officially deprecated by Microsoft, and has been so for years and years now. In fact, it was most likely deprecated before XInput was even available. Regardless, MDX did not have support for XInput, and in fact never will. If you had actually read the link you posted, you would see that the offer was providing his own wrapper around XInput for use with MDX, but even that link is hilariously old.

Yes, the latest DirectX SDK (February 2010) contains support for XInput, and yes it also contains the old MDX references, but that doesn't mean that the managed version has support for all of the native components. Your only options are to upgrade your application to use either XNA, the official Microsoft replacement, or SlimDX, which is a community project conceptually closer to MDX.

Share this post


Link to post
Share on other sites
Quote:
Original post by Mike.Popoloski
Managed DirectX is officially deprecated by Microsoft, and has been so for years and years now. In fact, it was most likely deprecated before XInput was even available. Regardless, MDX did not have support for XInput, and in fact never will. If you had actually read the link you posted, you would see that the offer was providing his own wrapper around XInput for use with MDX, but even that link is hilariously old.

Yes, the latest DirectX SDK (February 2010) contains support for XInput, and yes it also contains the old MDX references, but that doesn't mean that the managed version has support for all of the native components. Your only options are to upgrade your application to use either XNA, the official Microsoft replacement, or SlimDX, which is a community project conceptually closer to MDX.


Thanks for the info, it's been a couple of years since I ever tried using DirectX or OpenGL, and that was with good old C++

So what your telling me is I need to use XNA, and by that I assume you mean XNA Gaming Studio ?

Share this post


Link to post
Share on other sites
HHHMMM, now I have another issue LOL

I installed XNA game studio 3.0

Created a basic WinForm project and added the following "References" and "using":
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;

Added one variable for gamePadState:

namespace X360ControllerTest1
{
public partial class Form1 : Form
{

GamePadState gamePadState;


public Form1()
{
InitializeComponent();
}

}
}

And it compiles, but blows the following error at runtime:
System.IO.FileNotFoundException was unhandled
Message: Could not load file or assembly 'Microsoft.Xna.Framework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d' or one of its dependencies. The system cannot find the file specified.

If I comment out the variable the form compiles and runs fine.

I've reinstalled XNA and reboot, any ideas?

Share this post


Link to post
Share on other sites
Quote:
Original post by NickGravelyn
You have to build your project as x86; not x64 or Any CPU. The XNA binaries are 32-bit only. That usually is what causes that error.


Dude, You're a frickin GENIUS ..!!

Only just switched to 64bit, and keep forgetting about it.
I've been pulling my damn hair out LOL

Thanks a million :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this