Author Topic: Unable to intialize BASSInit.BASS_DEVICE_DEFAULT on W10 Machine but does on W7  (Read 198 times)

Hugh_Self_Taught

  • Posts: 4
Hi Clever people, I'm developing a small Win program using VS2019 Winforms .Net framework. I have created an installer file on my development Win7 x64 desktop & installed on same but when installed & opened on my win10 laptop I get the error in the attachment. The line 48 refers to this line Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero). I also have VS2019 on my laptop so tried copied the project there & ran it getting the same issue. Don't know why there's no issue on the Win7 machine but is on the Win10. I tried the installer on my missus laptop with same issue. Any ideas?

Ian @ un4seen

  • Administrator
  • Posts: 24331
I'm not sure if it's true in this case, but initialization exceptions with BASS.Net are typically caused by the BASS.DLL file either being missing or the wrong architecture (32-bit vs 64-bit). Do you see it alongside your installed EXE? If so, is it the 32-bit or 64-bit version, and what "Platform target" setting do you have in your VS2019 project? They should match.

Hugh_Self_Taught

  • Posts: 4
Hi Ian, Thanks for trying to help. I checked the VS setting & took out the prefer 32bit. I rechecked the Bass.net.dll is the 668Kb from the Bass24.Net.Zip file Issue still happens. The image in my first post was when running from VS. These attached are from the installed version & the files in the installed folder

Hugh_Self_Taught

  • Posts: 4
The strange thing now is after taking out the prefer32bit in VS it'll run in VS but still the issue once compiled & installed. Very confusing as the installer is set for x64 which both machines are.

Ian @ un4seen

  • Administrator
  • Posts: 24331
I rechecked the Bass.net.dll is the 668Kb from the Bass24.Net.Zip file Issue still happens. The image in my first post was when running from VS. These attached are from the installed version & the files in the installed folder

It looks like the issue there is that the BASS.DLL file is missing. Note that is required in addition to BASS.NET.DLL. You can get it from the Win32 BASS package on the BASS webpage.

Hugh_Self_Taught

  • Posts: 4
Thanks Ian, I discovered that as well by trying things while I was offline off site. I found that I needed to include the Bass.dll as one of the files needing to be included in the setup installer's compiler configuration. Thanks for the assistance. Much appreciated