Argh can not figure this out. Program works fine until it hitswhich is underCode:hFile = mmioOpen(File, ByVal 0&, MMIO_READ)and thats when I get hit with aCode:Public Sub CreateDSBFromWaveFile(ds As IDirectSound, ByVal File As String, dsb As IDirectSoundBuffer)And it highlights the 0& in that string.Code:compile error: User-Defined type may not be passed ByVal
I think the main code you have to see for this isI 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.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)
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!




Reply With Quote