A
Anders
Hey group
I havefor years been using the mci-thing as this:
Declare Function apimciSendString 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 apimciGetErrorString Lib "winmm.dll" _
Alias "mciGetErrorStringA" (ByVal dwError As Long, _
ByVal lpstrBuffer As String, ByVal uLength As Long) As Long
Function mp3Play(filename As String)
On Error Resume Next
Dim temp As String * 255
If Dir(filename) = vbNullString Then Exit Function
filename = GetShortPathName(filename, temp, 254)
filename = Left$(temp, filename)
apimciSendString "Close Mp3", 0, 0, 0
apimciSendString "Open " & filename & " Alias Mp3", 0, 0, 0
apimciSendString "Play Mp3", 0, 0, 0
End Function
in my access-applications, to play a mp3 file as the result of an event in
some forms. It works fine in alle the versions of office/access, but when it
comes to work in Windows Vista there is no sound. It is strange that there
is no error and i made a "progress-bar" on my own, and the bar is growing as
the time is passing, as it does on the WindowsXP machine, where the sound is
coming out of the loudspeaker.
Could anybody come up with a solution. I dont want to use a ocx-control.
Best regards
Anders
I havefor years been using the mci-thing as this:
Declare Function apimciSendString 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 apimciGetErrorString Lib "winmm.dll" _
Alias "mciGetErrorStringA" (ByVal dwError As Long, _
ByVal lpstrBuffer As String, ByVal uLength As Long) As Long
Function mp3Play(filename As String)
On Error Resume Next
Dim temp As String * 255
If Dir(filename) = vbNullString Then Exit Function
filename = GetShortPathName(filename, temp, 254)
filename = Left$(temp, filename)
apimciSendString "Close Mp3", 0, 0, 0
apimciSendString "Open " & filename & " Alias Mp3", 0, 0, 0
apimciSendString "Play Mp3", 0, 0, 0
End Function
in my access-applications, to play a mp3 file as the result of an event in
some forms. It works fine in alle the versions of office/access, but when it
comes to work in Windows Vista there is no sound. It is strange that there
is no error and i made a "progress-bar" on my own, and the bar is growing as
the time is passing, as it does on the WindowsXP machine, where the sound is
coming out of the loudspeaker.
Could anybody come up with a solution. I dont want to use a ocx-control.
Best regards
Anders