如何用API及MMSYSTEM.DLL播放AVI文件
Author:GordonF.MacLeod Howtoplayan.AVIfileusingAPIandtheMMSYSTEM.DLL.. ------------------------------------------------------------------- Hereshowtoplayan.AVIfileviaAPI DeclarethisAPI: DeclareFunctionmciSendStringLib"MMSYSTEM"(ByValpstrComm
'Author:GordonF.MacLeod
'Howtoplayan.AVIfileusingAPIandtheMMSYSTEM.DLL..
'-------------------------------------------------------------------
'Here'showtoplayan.AVIfileviaAPI
'DeclarethisAPI:
DeclareFunctionmciSendString&Lib"MMSYSTEM"(ByValpstrCommand$,
ByVallpstrReturnStrAsAny,ByValwReturnLen,ByValCallBack)
'Addthiscodetotheappropriateevent:
DimCmdStr$
DimReturnVal&
'Modifypathandfilenameasnecessary
CmdStr$="playG:VFW_CINEAK1.AVI"
ReturnVal&=mciSendString(CmdStr$,0&,0,0&)
'ToplaytheAVI'fullscreen'appendtoCmdStr$:
CmdStr$="playG:VFW_CINEAK1.AVIfullscreen"->
'Howtoplayan.AVIfileusingAPIandtheMMSYSTEM.DLL..
'-------------------------------------------------------------------
'Here'showtoplayan.AVIfileviaAPI
'DeclarethisAPI:
DeclareFunctionmciSendString&Lib"MMSYSTEM"(ByValpstrCommand$,
ByVallpstrReturnStrAsAny,ByValwReturnLen,ByValCallBack)
'Addthiscodetotheappropriateevent:
DimCmdStr$
DimReturnVal&
'Modifypathandfilenameasnecessary
CmdStr$="playG:VFW_CINEAK1.AVI"
ReturnVal&=mciSendString(CmdStr$,0&,0,0&)
'ToplaytheAVI'fullscreen'appendtoCmdStr$:
CmdStr$="playG:VFW_CINEAK1.AVIfullscreen"->
- 上一篇:使机箱内的小喇叭发出不同的声音
- 下一篇:如何从SOUND.DRV中提取声音
精彩图集
精彩文章