Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
To VP or not VB that is the question
Message
From
10/12/2001 09:43:22
 
 
To
10/12/2001 09:19:23
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00592024
Message ID:
00592046
Views:
13
Nice try, but that didn't work either. Can you get it to load?

Glenn

>>What am I doing wrong here? I cannot load the DLL
>>
>>
>>#if .f.
>>	Playing an AVI file
>>	this tip demonstrates how to play an AVI video file without using the Multimedia (MCI) control.
>>
>>	1. add a basic module with following code
>>
>>	declare function mciSendString Lib "winmm.dll" alias _
>>	"mciSendStringA" (
>>	ByVal lpstrCommand as string,
>>	ByVal lpstrReturnString as string,
>>	ByVal uReturnLength as long,
>>	ByVal hwndCallback as long) as long
>>
>>	2. add following code to Form1
>>
>>	private Sub Form_Activate()
>>	Dim returnstring as string
>>	FileName as string
>>	returnstring = space(127)
>>	'Avifile to play'
>>	FileName = "F:\Funstuff\Videos\Highperf\Welcome1.avi"
>>	erg = mciSendString("open " & chr$(34) & FileName & chr$(34) & " type avivideo alias video", returnstring, 	127, 0)
>>	erg = mciSendString("set video time format ms", returnstring, 127, 0)
>>	erg = mciSendString("play video from 0", returnstring, 127, 0)
>>	end Sub
>>
>>	'It is important to close the video, even if the file to play has run out.  To close the video, use the following line of code:'
>>
>>	erg = mciSendString("close video", returnstring, 127, 0)
>>#endif
>>
>>define class PlayAvi as relation
>>
>>	cFileName	=	''
>>
>>	function init
>>		declare long mciSendString in "wimm.dll" as alias mciSendStringA string, string, long, long
>>
>>	function play
>>	LOCAL lcRetString, lcFileName
>>		IF not EMPTY( this.cFileName) and not EMPTY(SYS(2000,this.cFileName))
>>			lcFileName = FULLPATH(this.cFileName)
>>			lcRetString = space(127)
>>			mciSendString(;
>>				"open " + chr$(34) + ;
>>				lcFileName + chr$(34) + ;
>>				" type avivideo alias video", ;
>>				lcRetString, 127, 0)
>>			mciSendString("set video time format ms", lcRetString , 127, 0)
>>			mciSendString("play video from 0", lcRetString , 127, 0)
>>		ENDIF
>>
>>	function destroy
>>		lcRetString = space(127)
>>		= mciSendString("close video", lcRetString, 127, 0)
>>
>>enddefine
>>
>>
>>Glenn
>
>Glenn,
>I haven't check it thoroughly nor tested but first I would declare and pass strings by reference (though it says byVal).
>Cetin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform