# invalid mex file problem.

**URL:** <https://psychtoolbox.discourse.group/t/invalid-mex-file-problem/483>\
**Category:** Uncategorized\
**Created:** [October 20, 2011, 10:45pm UTC](https://psychtoolbox.discourse.group/t/invalid-mex-file-problem/483 "2011-10-20T22:45:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Allen\_Ingling](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Allen\_Ingling](https://psychtoolbox.discourse.group/u/Allen_Ingling)\
**Post date:** [October 20, 2011, 10:45pm UTC](https://psychtoolbox.discourse.group/t/invalid-mex-file-problem/483/1 "2011-10-20T22:45:10Z")

</div>

I am the first time user of psychtoolbox. When I try to run PsychHID('NumberDevices?'), it gave me following error message:  
  
"??? Invalid MEX-file 'C:\Matlab  
Functions\Psychtoolbox\PsychBasic\MatlabWindowsFilesR2007a\PsychHID.mexw32': The specified  
module could not be found."  
  
I am running a 32 Matlab on a 64 windows 7 machine.  
I tried UpdatePsychtoolbox, which run good. Anyone could please give me any suggestion?  
  
Thanks

---

<div class="post-metadata">

**Author:** ![mariokleiner](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@mariokleiner](https://psychtoolbox.discourse.group/u/mariokleiner)\
**Post date:** [October 20, 2011, 11:45pm UTC](https://psychtoolbox.discourse.group/t/invalid-mex-file-problem/483/2 "2011-10-20T23:45:08Z")

</div>

Type KbCheck(-1) and you will understand. Btw. PsychHID doesn't support all functions of the os/x PsychHID, only the subset that makes sense on Windows. Also most stuff is only lightly tested, because i don't have suitable hardware for testing and feedback since release was almost non-existent. Prepare for street bumps...  
  
-mario  
  

> --- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), "yangyangnh" \<yangyangnh@...\> wrote:  
> \>  
> \> I am the first time user of psychtoolbox. When I try to run PsychHID('NumberDevices?'), it gave me following error message:  
> \>   
> \> "??? Invalid MEX-file 'C:\Matlab  
> \> Functions\Psychtoolbox\PsychBasic\MatlabWindowsFilesR2007a\PsychHID.mexw32': The specified  
> \> module could not be found."  
> \>   
> \> I am running a 32 Matlab on a 64 windows 7 machine.  
> \> I tried UpdatePsychtoolbox, which run good. Anyone could please give me any suggestion?  
> \>   
> \> Thanks  
> \>

---

<div class="post-metadata">

**Author:** ![Allen\_Ingling](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Allen\_Ingling](https://psychtoolbox.discourse.group/u/Allen_Ingling)\
**Post date:** [April 5, 2013, 1:52pm UTC](https://psychtoolbox.discourse.group/t/invalid-mex-file-problem/483/3 "2013-04-05T13:52:23Z")

</div>

I copy the 32-Bit libusb-1.0.dll from the PsychContributed folder into your C:\WINDOWS\system folder,but it doesn't work still,and it warning Invalid MEX-file "PsychHID.mexw32"   
ps,my PC's operation sysytem is Win7 32 bit  

> --- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), "yangyangnh" \<yangyangnh@...\> wrote:  
> \>  
> \> It works now. Thanks very much.  
> \>   
> \> Other than PsychHID, do you know other better things to drive HID device using Matlab?  
> \>   
> \> Thanks.  
> \>   
> \>   
> \>   
> \>   
> \>   
> \>   
> \>   
> \>   
> \> --- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), "Mario" \<mario.kleiner@\> wrote:  
> \> \>  
> \> \>   
> \> \>   
> \> \> Type KbCheck(-1) and you will understand. Btw. PsychHID doesn't support all functions of the os/x PsychHID, only the subset that makes sense on Windows. Also most stuff is only lightly tested, because i don't have suitable hardware for testing and feedback since release was almost non-existent. Prepare for street bumps...  
> \> \>   
> \> \> -mario  
> \> \>   
> \> \> --- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), "yangyangnh" \<yangyangnh@\> wrote:  
> \> \> \>  
> \> \> \> I am the first time user of psychtoolbox. When I try to run PsychHID('NumberDevices?'), it gave me following error message:  
> \> \> \>   
> \> \> \> "??? Invalid MEX-file 'C:\Matlab  
> \> \> \> Functions\Psychtoolbox\PsychBasic\MatlabWindowsFilesR2007a\PsychHID.mexw32': The specified  
> \> \> \> module could not be found."  
> \> \> \>   
> \> \> \> I am running a 32 Matlab on a 64 windows 7 machine.  
> \> \> \> I tried UpdatePsychtoolbox, which run good. Anyone could please give me any suggestion?  
> \> \> \>   
> \> \> \> Thanks  
> \> \> \>  
> \> \>  
> \>
