1

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,

J.J. Hakala
  • 6,136
  • 6
  • 27
  • 61
Nayki
  • 11
  • 3
  • Tried this a few times before realising my CD drive is not even connected :/ But I did get a different error using `ctypes.windll.WINMM.mciSendStringW(u"set cdaudio door open", None, 0, None)`, can you try that? – 101 Aug 01 '16 at 23:37

0 Answers0