lreturn=mciexecute(“open c:\mydocu~1\music01.dat alias openfile type mpegvideo”) (2)
那么,在以后的mci command string中lpszdevice参数必须指定为openfile。例如,关闭该文件的代码如下:
lreturn=mciexecute(“close openfile”) (3)
如果我们没有为打开的文件设定别名,则以后调用的mci command string中lpszdevice参数为dos路径名加文件名。例子如下: