【 在 jzhiyi (之一) 的大作中提到: 】 : 【 在 zhouxiaotao (淘淘) 的大作中提到: 】 : : 我用MCI函数mcisendstringa来播放AVI文件,可PB老是说调用出错,错误信息如下 : : : : error message : : MMSYSTEM292指定的命令需要别名、文件、驱动程序或设备名。请提供其中任何一 : : 个 : : : : 我触发了pbm_mmmcinotify事件也还是一样,播放CD也是如此,到底是怎么回事?请 : : 求各位大侠指点,谢谢! : : : : 播放AVI的程序如下: : : 1.在窗口的OPEN事件中的程序: : : string is_file_name : : is_file_name='main' : : long ll_rtn_code : : string ls_handle : : ll_rtn_code=wf_sendstringa('Open'+is_file_name) : : if ll_rtn_code<>1 then return : : ls_handle=string(handle(dw_1)) : : wf_sendstringa("Window"+is_file_name+"handle"+ls_handle) : : wf_sendstringa('Put'+is_file_name+'destination') : : wf_sendstringa('Set'+is_file_name+'time format frames') : : if wf_sendstringa("Play"+is_file_name)<>1 then : : messagebox('错误','不能播放') : : end if : : : : 2.自定义函数wf_sendstringa()程序: : : long ll_rtn : : string ls_error,ls_string : : ls_error=space(128) : : ls_string=space(128) : : ll_rtn=mcisendstringa(arg_message,ls_string,127,0) : : if ll_rtn<>0 then : : mcigeterrorstringa(ll_rtn,ls_error,len(ls_error)-1) : : messagebox('错误','未找到影像文件') : : return ll_rtn : : end if : : return 1 : : : : 播放CD程序如下: : : long ll_return : : string ls_return,ls_message='play_cdaudio_notify' : : ls_return=fill(char(0),255) : : ll_return=mcisendstringa(ls_Message,ls_Return,255,Handle(this)) : : if ll_return<>0 then : : mciGetErrorStringA(ll_Return,ls_Return,255) : : messagebox('CD出错',ls_return) : : end if : : : : 我的外部函数声明为: : : FUNCTION Long mciSendStringA(String Lpstrcommand,ref string lpstrRtnSt : : ring,int wRtnLength,uint hCallback) LIBRARY "WINMM.DLL" : : : : 请各位大侠救我! : 我用PB播放过avi,你的情况我研究研究,明天见我的答复!
好象没什么大问题!注意play等与文件名之间有空格,与handle等之间也有空格 !我做了一个用户对象,只要放上去就能播放avi,并且随着你窗口的关闭关闭, 不关闭就连续回放。
-- ※ 来源:.网易虚拟社区北京站 http://bj.netease.com.[FROM: 202.99.56.121]
|
|