Argh can not figure this out. Program works fine until it hits
Code:
hFile = mmioOpen(File, ByVal 0&, MMIO_READ)
which is under
Code:
Public Sub CreateDSBFromWaveFile(ds As IDirectSound, ByVal File As String, dsb As IDirectSoundBuffer)
and thats when I get hit with a
Code:
compile error:
User-Defined type may not be passed ByVal
And it highlights the 0& in that string.

I think the main code you have to see for this is
Code:
Option Explicit
Declare Function mmioOpen Lib "winmm.dll" Alias "mmioOpenA" (ByVal szFileName As String, lpmmioinfo As mmioinfo, ByVal dwOpenFlags As Long) As Long
Public Const MMIO_READ = &H0
Declare Function mmioRead Lib "winmm.dll" (ByVal hmmio As Long, ByVal pch As Long, ByVal cch As Long) As Long
Dim hFile As Long
hFile = mmioOpen(File, ByVal 0&, MMIO_READ)
I guess I just don't understand the ByVal enough to understand why the 0& is not working. I'm patching code that was already working before, and a lot got erased some how, so I know it SHOULD work, I just don't know what I have to do to patch it. I'm sure I'm leaving out something really obvious.

ANY help would be greatly appreciated, if you want me to paste the whole pages of code up to that point I'll do that too. Or if you need to see something else let me know!

It's driving me crazy!