Bonjour,

Je suis en train de découvrir le développement des applications utilisant l'USB sous Windows. Une petite recherche m'a mené à cette API.
En effet cette API fonctionne sur différentes plateformes. Pour moi ce qui m'intéresse est l'USB HID sous Windows. On trouve deux programmes de test : le premier est dans le répertoire "windows" et le deuxième est une GUI sous le répertoire "tesgui". Pour pouvoir compiler cette dernière il suffit d'extraire ce dossier dans le même répertoire que hidapi-0.7.0.

Bref, j'ai essayé de compiler le programme sous le répertoire "windows", la compilation et la génération de la dll ont réussi mais lors de l'exécution les messages suivants s'affichent et le programme ne se lance pas

'hidtest.exe'*: Chargé 'C:\Users\Noussaier\Desktop\USB_HID\hidapi-0.7.0\windows\Debug\hidtest.exe', Les symboles ont été chargés.
'hidtest.exe'*: Chargé 'C:\Windows\System32\ntdll.dll', Cannot find or open the PDB file
'hidtest.exe'*: Chargé 'C:\Windows\System32\kernel32.dll', Cannot find or open the PDB file
'hidtest.exe'*: Chargé 'C:\Windows\System32\KernelBase.dll', Cannot find or open the PDB file
'hidtest.exe'*: Chargé 'C:\Users\Noussaier\Desktop\USB_HID\hidapi-0.7.0\windows\Debug\hidapi.dll', Les symboles ont été chargés.
'hidtest.exe'*: Chargé 'C:\Windows\System32\setupapi.dll', Cannot find or open the PDB file
'hidtest.exe'*: Chargé 'C:\Windows\System32\cfgmgr32.dll', Cannot find or open the PDB file
'hidtest.exe'*: Chargé 'C:\Windows\System32\msvcrt.dll', Cannot find or open the PDB file
'hidtest.exe'*: Chargé 'C:\Windows\System32\rpcrt4.dll', Cannot find or open the PDB file
'hidtest.exe'*: Chargé 'C:\Windows\System32\advapi32.dll', Cannot find or open the PDB file
'hidtest.exe'*: Chargé 'C:\Windows\System32\sechost.dll', Cannot find or open the PDB file
'hidtest.exe'*: Chargé 'C:\Windows\System32\gdi32.dll', Cannot find or open the PDB file
'hidtest.exe'*: Chargé 'C:\Windows\System32\user32.dll', Cannot find or open the PDB file
'hidtest.exe'*: Chargé 'C:\Windows\System32\lpk.dll', Cannot find or open the PDB file
'hidtest.exe'*: Chargé 'C:\Windows\System32\usp10.dll', Cannot find or open the PDB file
'hidtest.exe'*: Chargé 'C:\Windows\System32\oleaut32.dll', Cannot find or open the PDB file
'hidtest.exe'*: Chargé 'C:\Windows\System32\ole32.dll', Cannot find or open the PDB file
'hidtest.exe'*: Chargé 'C:\Windows\System32\devobj.dll', Cannot find or open the PDB file
'hidtest.exe'*: Chargé 'C:\Windows\System32\msvcr100d.dll', Cannot find or open the PDB file
'hidtest.exe'*: Chargé 'C:\Windows\System32\imm32.dll', Cannot find or open the PDB file
'hidtest.exe'*: Chargé 'C:\Windows\System32\msctf.dll', Cannot find or open the PDB file
'hidtest.exe'*: Chargé 'C:\Program Files\Hewlett-Packard\IAM\Bin\APSHook.dll', Cannot find or open the PDB file
'hidtest.exe'*: Chargé 'C:\Windows\System32\shlwapi.dll', Cannot find or open the PDB file
'hidtest.exe'*: Chargé 'C:\Windows\System32\hid.dll', Cannot find or open the PDB file
'hidtest.exe'*: Chargé 'C:\Windows\System32\wintrust.dll', Cannot find or open the PDB file
'hidtest.exe'*: Chargé 'C:\Windows\System32\crypt32.dll', Cannot find or open the PDB file
'hidtest.exe'*: Chargé 'C:\Windows\System32\msasn1.dll', Cannot find or open the PDB file
Le programme '[6840] hidtest.exe: Natif' s'est arrêté avec le code 1 (0x1).

Pour ce programme de test est ce que la génération de dll s'est effectuée correctement ?? Si oui comment je peux l'utiliser dans un simple programme en C++ ??

Pour le programme de test sous "testgui", lors de la compilation les warnings suivants s'affichent et la dll ne se génère pas.

1>------ Début de la génération*: Projet*: testgui, Configuration*: Debug Win32 ------
1> hid.c
1> test.cpp
1>c:\users\noussaier\desktop\usb_hid\hidapi-0.7.0\testgui\test.cpp(349): warning C4018: '<'*: incompatibilité signed/unsigned
1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(C:\Users\Noussaier\Desktop\USB_HID\hidapi-0.7.0\testgui\Debug\testgui.exe) ne correspond pas à la valeur de la propriété OutputFile (C:\Users\Noussaier\Desktop\USB_HID\hidapi-0.7.0\testgui\testgui.exe) de Linker. Cela peut entraîner une génération incorrecte de votre projet. Pour corriger ce problème, vérifiez que les valeurs des propriétés $(OutDir), $(TargetName) et $(TargetExt) correspondent à la valeur spécifiée dans %(Link.OutputFile).
1> Création de la bibliothèque C:\Users\Noussaier\Desktop\USB_HID\hidapi-0.7.0\testgui\Debug\testgui.lib et de l'objet C:\Users\Noussaier\Desktop\USB_HID\hidapi-0.7.0\testgui\Debug\testgui.exp
1>LINK : warning LNK4098: conflit entre la bibliothèque par défaut 'LIBCMT' et les autres bibliothèques*; utilisez /NODEFAULTLIB:library
1> Création de la bibliothèque C:\Users\Noussaier\Desktop\USB_HID\hidapi-0.7.0\testgui\Debug\testgui.lib et de l'objet C:\Users\Noussaier\Desktop\USB_HID\hidapi-0.7.0\testgui\Debug\testgui.exp
1>LINK : warning LNK4098: conflit entre la bibliothèque par défaut 'LIBCMT' et les autres bibliothèques*; utilisez /NODEFAULTLIB:library
1> testgui.vcxproj -> C:\Users\Noussaier\Desktop\USB_HID\hidapi-0.7.0\testgui\Debug\testgui.exe
========== Génération*: 1 a réussi, 0 a échoué, 0 mis à jour, 0 a été ignoré ==========

Comment puis-je corriger ces erreurs afin de pouvoir générer la dll ???
J'utilise Visual Studio 2010 Ultimate

Merci beaucoup.