[c#][direct input] Problème utilisation joystick

Problème utilisation joystick [c#][direct input] - C#/.NET managed - Programmation

Marsh Posté le 10-04-2006 à 10:34:44    

Chalut
Ben voila je développe une appli avec un joystick et j'utilise direct input et j'ai un problème à l'execution sur cette instruction:

Code :
  1. DeviceList dl = Manager.GetDevices(DeviceType.Joystick, EnumDevicesFlags.AttachedOnly);


 
mon eception:

Code :
  1. Managed Debugging Assistant 'LoaderLock' has detected a problem in 'C:\Documents and Settings\demonstration\Mes documents\Visual Studio 2005\Projects\InterfaceRoburoc\InterfaceRoburoc\bin\Release\InterfaceRoburoc.vshost.exe'.
  2. Additional Information: DLL 'C:\WINDOWS\assembly\GAC\Microsoft.DirectX\1.0.2902.0__31bf3856ad364e35\Microsoft.DirectX.dll' is attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang.


 
J'ai essayé en mode debug et release mais toujours le meme problème.
Qui a déja utilisé un joystick en c#???
Qui voit d'ou peut venir mon problème???????
Merki.

Reply

Marsh Posté le 10-04-2006 à 10:34:44   

Reply

Marsh Posté le 10-04-2006 à 14:55:50    

Bin il te dit que ce que t'utilises, tu l'utilises pas au bon moment...

Reply

Marsh Posté le 10-04-2006 à 15:05:54    

J'ai deja eu un probleme similiaire, c'est un bug de certaines dll DirectX avec .net 2.0.
 
Désactive seulement le mda, et ca devrait tourner sans problème.
 
(juste pour dire)
http://www.google.fr/search?hl=fr& [...] ectx&meta=

Reply

Marsh Posté le 10-04-2006 à 15:12:32    

ben je l'ai fait mais maintenant j'ai une exception sur:
joystick.SetCooperativeLevel(
                this,
                CooperativeLevelFlags.NonExclusive|
                CooperativeLevelFlags.Background);
 
Mon exception:
An unhandled exception of type 'Microsoft.DirectX.DirectInput.InputException' occurred in InterfaceRoburoc.exe
 
J'ai bien créer mon device (joystick) mais je ne peux pas changer le cooperative level.
 
Additional information: Error in the application.

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed