Topic: OGG decoder DLL reporting errors.

Pardon me if this is the wrong place for this, but I'm trying to use the "Blastbay_oggdec.dll" (not the BGT), but when I call it, I get the following error (on one machine, while working fine on another):

"Unable to load DLL "blastbay_oggdec.dll": Invalid access to memory location".

A little research reveals that it's NOT the physical location of the DLL that it can't find (same folder as the exe), but the routines themselves in the dll not working.

As mentioned, the DLL works fine on my own machine (64bit Win7 Home), but not on the computer of another user (also 64bit Win7 Home) testing the software.

I'm at a bit of a loss to figure out why it's not working. Can anyone help? Thx.

2 (edited by philip_bennefall 2014-09-25 01:09:44)

Re: OGG decoder DLL reporting errors.

Good evening,

Without yet knowing the specifics, my initial guess would be that it might have to do with dependencies and/or how the symbols are exported. This dll was built years ago with a very old version of MinGw, so we may be seeing some compatibility issue. Are you using GetProcAddress to retrieve the function pointers, or did you generate an import library?

If you could drop me an email with a small test project of yours, that'd be most helpful.

Kind regards,

Philip Bennefall
P.S. From what language are you calling the dll?

3 (edited by Mugsy 2014-09-25 21:10:42)

Re: OGG decoder DLL reporting errors.

philip_bennefall wrote:

Are you using GetProcAddress to retrieve the function pointers, or did you generate an import library?

If you could drop me an email with a small test project of yours, that'd be most helpful.

Kind regards,

Philip Bennefall
P.S. From what language are you calling the dll?

Hey Philip, thanks for the reply.

I'm calling the DLL from Visual Basic Express 2013. I put the dll in the same folder as the exe and declare the following function:

Public Declare Function Oggdec_DecodeFile Lib "blastbay_oggdec.dll" (source_filename As String, destination_filename As String) As Boolean  ' Used to convert ogg to wav for playback & getting length.

...then call it with:

Oggdec_DecodeFile(strSample, "converted.wav")

Works fine on my own computer, but a friend testing the same program gets the error I reported earlier. He verified that the dll is in his exe folder, and has .Net-4.5 installed, so I'm at a bit of a loss to figure out what's wrong.

I'm afraid I can't provide the full code, but the lines above are pretty much all there is that concern the decoder (once the file is converted to a temporary wave file, I just use the wave file for everything.

If you can help me figure this out, it would be greatly appreciated. Thanks.
.

Follow-up 9/25: Looks like the DLL was just not being found. I'm being told that ogg playback is now working. Thx

Re: OGG decoder DLL reporting errors.

Ah, good to know! I was about to rewrite the whole thing since I no longer have the original source code. tongue

Kind regards,

Philip Bennefall

Re: OGG decoder DLL reporting errors.

philip_bennefall wrote:

Ah, good to know! I was about to rewrite the whole thing since I no longer have the original source code. tongue

Hey Philip, any chance you're still willing to attempt that rewrite?

I'm getting the mysterious "invalid access to memory location" error again. No idea why. My program is finding the DLL just fine (confirmed by deleting then restoring it), it just can't use it.

If I changed my code in some way to break it, I don't know how. One day it worked, today it doesn't. sad

Perhaps there is another way to call it from VB other than:

Public Declare Function Oggdec_DecodeFile Lib "blastbay_oggdec.dll" (source As String, destination As String) As Boolean

Thanks.