Author Topic: Please any help, Error from Bass_Init  (Read 102 times)

TEW

  • Posts: 15
Please any help, Error from Bass_Init
« on: 11 Apr '21 - 18:47 »
Please Help!
I am a 70 year old trying to learn a new skill.  I am trying to create a program to play mp3s. (learning experience).
The program is written in VB.Net 2019 and works well in debug but when I try and publish it, it fails.  I have isolated the problem to be in the bass_init statement by placing msgbox before and after the bass_init statement.

I have tried different formats for the bass_init including:
BASS_Init(-1, 44100, BASS_DEVICE_DEFAULT, Me.Handle, stream)
BASS_Init(-1, 44100, 0, 0, 0)

Again the program works fine in debug mode.  But when published I get the following error.

"Play Error Conversion from string "Unable to load DLL 'bass.dll': I to type 'Integer' is not valid"
I have copied Bass.Net.dll to every directory I can think of

Thanks for any help.
I will be happy to buy a cup of coffee for a solution.

Thanks

 



Chris

  • Posts: 1933
Re: Please any help, Error from Bass_Init
« Reply #1 on: 11 Apr '21 - 20:27 »
Hi welcome in the Big Developing World    :D

You musst place also bass.dll in the publish folder.
So you just need bass.dll AND bass.Net.dll in the published Folder.

Regards Chris

TEW

  • Posts: 15
Re: Please any help, Error from Bass_Init
« Reply #2 on: 11 Apr '21 - 22:13 »
Thanks Chris,
I have put the bass.net.dll in the published folder and every other folder that I could think of.

Thanks

Ian @ un4seen

  • Administrator
  • Posts: 23550
Re: Please any help, Error from Bass_Init
« Reply #3 on: 12 Apr '21 - 15:09 »
Note the BASS.DLL file is also needed when using BASS.Net. Both files should be placed alongside your app's EXE. Also make sure the BASS.DLL file is the correct one for your app, ie. 32-bit or 64-bit. To keep things simple, don't set your app's platform to "Any CPU".

TEW

  • Posts: 15
Re: Please any help, Error from Bass_Init
« Reply #4 on: 13 Apr '21 - 00:50 »
Thanks to all,
You were right.  I just could not figure out where VS was publishing the app.  Once I figured that out and put the DLLs in that directory it works great.  Now on to bigger and better things.

I'm up to buying that cup of coffee or making a donation if you tell me where and how.
Thanks again
Tom