I'm trying to create an application in C# that uses a joystick. I went to "http://www.codeproject.com/KB/directx/joystick.aspx" and basically copied the example exactly but I keep getting the follow error: "is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)". The application is currently a console app for testing purposes. I used the following includes:
"using Microsoft.DirectX;" "using Microsoft.DirectX.DirectInput;"
and the line of code that throws the error is
DeviceList gameControllerList = Manager.GetDevices(DeviceClass.GameControl,EnumDevicesFlags.AttachedOnly);
Also I'm using Windows 7, not sure if that helps or not.