
Sound, Wave, Multimedia, API, How?
This is a multi-part message in MIME format.
------=_NextPart_000_01BC757C.DBCEF820
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Hi,
Try:
Option Compare Database
Option Explicit
'******* Declarations Section *******
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
Declare Function mciGetErrorString Lib "winmm.dll" Alias
"mciGetErrorStringA" (ByVal dwError As Long, ByVal lpstrBuffer As String,
ByVal uLength As Long) As Long
Public Function PlayAVI(FileName As String) As Integer
PlayAVI = mciSendString("play " & FileName, "", 0, 0)
End Function
Public Function mciErrorDesc(ErrorNum As Long) As String
Dim Buffer As String * 256
Dim I As Long
I = mciGetErrorString(ErrorNum, Buffer, 256)
mciErrorDesc = Buffer
End Function
And you just need:
PlayAVI "\\Elminster\c\windows\help\closewinn.avi" ' Access 97
if you doN't desire error messages,
or (Access 7 or Access 97):
? mciErrorDesc( PlayAVI( "\\Elminster\c\widows\help\closewin.avi"))
MMSYSTEM275 Cannot find the specified file. Make sure the path and filename
are correct.
? mciErrorDesc( PlayAVI( "\\Elminster\c\windows\help\closewin.avi"))
The specified command was carried out.
Note that the new book from Ken Getz and Mike Gilbert has a whole chapter
on multimedia.
Hope it may help,
Vanderghast, Access MVP
------=_NextPart_000_01BC757C.DBCEF820
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<html><head></head><BODY bgcolor=3D"#FFFFE8"><p><font size=3D2 =
color=3D"#000000" face=3D"Arial">Hi,<br><br>Try:<br><br><font =
color=3D"#008000"><b>Option Compare Database<br>Option =
Explicit<br><br>'******* Declarations Section =
*******<br><br><br><br><br>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<br>Declare =
Function mciGetErrorString Lib "winmm.dll" Alias =
"mciGetErrorStringA" (ByVal dwError As Long, ByVal lpstrBuffer =
As String, ByVal uLength As Long) As Long<br><br><br>Public Function =
PlayAVI(FileName As String) As Integer<br> PlayAVI =3D =
mciSendString("play " & FileName, "", 0, =
0)<br>End Function<br><br>Public Function mciErrorDesc(ErrorNum As Long) =
As String<br>Dim Buffer As String * 256<br>Dim I As Long<br> =
I =3D mciGetErrorString(ErrorNum, Buffer, 256)<br> =
mciErrorDesc =3D Buffer<br>End Function</b><font =
color=3D"#000000"><br><br><br>And you just need:<br><br>	PlayAVI =
"\\Elminster\c\windows\help\closewinn.avi"	' Access =
97<br>	if you doN't desire error messages,<br>or (Access 7 or =
Access 97):<br><br>	? mciErrorDesc( PlayAVI( =
"\\Elminster\c\widows\help\closewin.avi"))<br>MMSYSTEM275 =
Cannot find the specified file. Make sure the path and filename are =
correct. =
&=
nbsp; &n=
bsp; &nb=
sp; &nbs=
p;  =
; =
&=
nbsp; &n=
bsp; &nb=
sp; &nbs=
p;  =
; =
&=
nbsp; <br>	? =
mciErrorDesc( PlayAVI( =
"\\Elminster\c\windows\help\closewin.avi"))<br>The specified =
command was carried out. <br><br><br>Note that the new book =
from Ken Getz and Mike Gilbert has a whole chapter on =
multimedia.<br><br>Hope it may help,<br>Vanderghast, Access MVP</p>
</font></font></font></body></html>
------=_NextPart_000_01BC757C.DBCEF820--