Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
2820 connectés 

  FORUM HardWare.fr
  Programmation
  C#/.NET managed

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

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

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

n°1342797
grassouill​e
Posté le 10-04-2006 à 10:34:44  profilanswer
 

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.

mood
Publicité
Posté le 10-04-2006 à 10:34:44  profilanswer
 

n°1343077
bjone
Insert booze to continue
Posté le 10-04-2006 à 14:55:50  profilanswer
 

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

n°1343091
chagarou
Posté le 10-04-2006 à 15:05:54  profilanswer
 

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=

n°1343103
grassouill​e
Posté le 10-04-2006 à 15:12:32  profilanswer
 

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.


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  C#/.NET managed

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

 

Sujets relatifs
script méteo problème à l'executionprobleme calcul taille SQL
[GetXMLTree] Problème de récupération de certains flux RSSutilisation de WindowProc
Win32 problème de liens...[javascript] infos utilisation d'activex
problème de filsPetit programme pour faire ses comptes ; C'est quoi ce gros bug
Probleme chargement librairie.problème de booléen
Plus de sujets relatifs à : [c#][direct input] Problème utilisation joystick


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR