[python-win32] using MCI and related interfaces with pywin32
Marek Kubica
pythonmailing at web.de
Mon Jan 31 20:40:22 CET 2005
On Sun, 30 Jan 2005 12:41:31 -0800 (PST)
david sumner <davesum99 at yahoo.com> wrote:
> Using pywin32, I'm trying to invoke multimedia devices
> with the MCI (Media Control Interface) API's. These
> commands do stuff like play video files.
>
> The strange thing is, all the relevant commands are
> defined in mmsystem.py, but the critical core
> functions used to send commands, such as
> mciSendString(), do not appear to be defined anywhere.
>
> Help?
def mci():
import ctypes
wm = ctypes.windll.WINMM
wm.mciSendStringA("Set CDAudio Door Open wait", 0, 0, 0)
wm.mciSendStringA("Set CDAudio Door Closed wait", 0, 0, 0)
I used this to open my cdrom tray.
It uses whe winmm.dll and ctypes (which is always a nice thing to have)
greets,
Marek
More information about the Python-win32
mailing list