Python ctypes cannot open disk tray using mciSencCommand

203 Views Asked by At

I'm seeking your help because i cannot find why i cannot open my disk tray using python2.7 on a windows 7 workstation.

I'm using this simple code:

import ctypes
ctypes.windll.winmm.mciSendStringW("set CDAudio door open",0,0,0)

Return value is 292

I've checked on the microsoft website and erro 292 stand for MCIERR_MISSING_DEVICE_NAME.

How can i find the right DEVICE_NAME to make this script works ?

Thanks in advance, Regards,

0

There are 0 best solutions below