-1

I'm developing an app in c# that uses directinput... in my dev pc, that there's installed directx sdk everything works fine... but in another pc that have only directx client installed, the app didn't work.. I added into the folder the dll:

  • Microsoft.DirectX.DirectInput.dll

I need to add someother to let's play???

thanks in advance! the error is this: alt text

Is not an application WIn32 valid (Exception from HRESULT: 0x800700C1)

this happens here:

        // Find all the GameControl devices that are attached.
        DeviceList gameControllerList = Manager.GetDevices(DeviceClass.GameControl, EnumDevicesFlags.AttachedOnly);
ghiboz
  • 7,863
  • 21
  • 85
  • 131
  • 2
    "the app didn't work" is pretty vague. Care to give us more details? – Jon Skeet Nov 18 '10 at 08:05
  • I've added the message that is shown – ghiboz Nov 18 '10 at 08:08
  • Can you oress "Dettagli" and update the screenshot? – Filip Ekberg Nov 18 '10 at 08:09
  • I guess it's compatible with the platform you are running it on :http://www.dotnetspider.com/resources/29618-Is-not-valid-Win-application-Exception-from.aspx Which OS & version of DirectX are you using ? – user44298 Nov 18 '10 at 08:11
  • hmmm I develop with xp32 and the app is on win7 64, but the strange thing is that the app starts correctly but when I call directinput to give me the joy lists appear the message above – ghiboz Nov 18 '10 at 08:16
  • Take a look here for which DirectX version you need http://en.wikipedia.org/wiki/DirectX and download it. But one thing is for sure your dev pc is different OS from this one. – user44298 Nov 18 '10 at 08:18
  • Now I'm confused:) I think @Jon Skeet is correct: could you give as much detail as possible. Do you know where in the code it crashes ? if yes post some. Anything that can give a clue. thanks – user44298 Nov 18 '10 at 08:21
  • thanks to you ivo s.. added the code that gives the error above – ghiboz Nov 18 '10 at 08:23
  • Yeah, I'm pretty sure the Microsoft.DirectX.DirectInput.dll or some dependent dll is not the right one you need - you most likely need a different version of the SDK. The first think I would try is to simply download the correct SDK with the right dlls for your windows version and try again. This will most likely fix it - most likely:) Good luck! – user44298 Nov 18 '10 at 08:33

1 Answers1

2

0x800700C1 is ERROR_BAD_EXE_FORMAT

http://technet.microsoft.com/en-us/library/cc782541(WS.10).aspx

I'm guessing you are targetting 64-bit windows and DirectInput is 32-bit only ...

Goz
  • 61,365
  • 24
  • 124
  • 204
  • thanks, but IIS??? isn't an web app, but a standalone app and the program starts and works (except for the directinput call) – ghiboz Nov 18 '10 at 09:22
  • Its just describing what the error means. Sure it is for IIS but the same error will apply equally to any software that raises the exception. Admittedly the error could be raised in other ways I'm sure but don't discount the info there just because its for IIS. It may well apply directly to your software. After all both you and IIS are using the same libraries when you look far enough underneath :) – Goz Nov 18 '10 at 09:24