|
Latch
Posts: 89
|
 |
« on: 14 May '09 - 16:09 » |
Quote
|
We'v been using Bass.Net quite successfully in our app since last year, but now we want our app to be able to support both 32 and 64 bit Windows in one download. The only way to accomplish this is to separate the 32 and 64 bit versions of the Bass library into 2 subfolders. Unfortunately, when we do this, the Bass.Net BASS_PluginLoadDirectory function doesn't appear to work correctly when referring to the new location of the Bass library files. Previously, everything was in our app's main program folder. We still keep the Bass.Net DLL in the main program folder because for .Net apps, any called assembly needs to be in the same folder as the starting app or it needs to be in the GAC (which we don't want to do). So, my question is why doesn't Bass.Net work when the native Bass DLLs are in a separate folder? I thought that was the whole purpose of the BASS_PluginLoadDirectory function. Am I missing something?
|
|
|
|
|
Logged
|
|
|
|
|
radio42
Posts: 4012
|
 |
« Reply #1 on: 14 May '09 - 17:08 » |
Quote
|
I'm not what is not correctly working - do you get any errors? If yes, what exactly? I also store all plugins in a seperate directory and it is just working fine here. But note, that BASS_PluginLoadDirectory only loads BASS plugins - not bass itself!
So I guess your whole issue is around the non-plugin libraries, like bass.dll, bass_fx.dll etc.
Please note, that in this case you would need to call the respective helper methods provided with each add-on called "LoadMe". e.g. "Bass.LoadMe" - these functions enable you to even load the native non-plugin libs from a different directory.
But note: In order to use the BASS plugin system you should always use BASS_PluginLoadDirectory for all BASS plugins - but only use LoadMe on the other add-ons!
|
|
|
|
|
Logged
|
|
|
|
|
Latch
Posts: 89
|
 |
« Reply #2 on: 17 May '09 - 15:59 » |
Quote
|
Ok, I've done what you said and it is now failing on the last line of this code on the BASS_PluginLoadDirectory function:
Bass.LoadMe(Application.StartupPath & "\bass32\bass.dll") AddOn.Fx.BassFx.LoadMe(Application.StartupPath & "\bass32\bass_fx.dll") AddOn.Mix.BassMix.LoadMe(Application.StartupPath & "\bass32\bassmix.dll") AddOn.Video.BassVideo.LoadMe(Application.StartupPath & "\bass32\BassVideo.dll") AddOn.Wma.BassWma.LoadMe(Application.StartupPath & "\bass32\basswma.dll") AddOn.Aac.BassAac.LoadMe(Application.StartupPath & "\bass32\bass_aac.dll") Bass.BASS_PluginLoadDirectory(Application.StartupPath & "\bass32")
If I comment out the last line, then it crashes on the Bass.Init function that shortly follows. I get no error either way. Visual Studio 2008 simply exits from the program without any error.
|
|
|
|
|
Logged
|
|
|
|
|
radio42
Posts: 4012
|
 |
« Reply #3 on: 17 May '09 - 16:18 » |
Quote
|
Note, thatBassVideo.dll, basswma.dll and bass_aac.dll are already plugins - so they can not be loaded twice. But can you show a bit more of your code. And what exact version you are using?!
|
|
|
|
|
Logged
|
|
|
|
|
Latch
Posts: 89
|
 |
« Reply #4 on: 19 May '09 - 12:59 » |
Quote
|
I'm using Bass.Net 2.4.2. The reason for the older version is that we still need to use the older BassVideo component before kenshin made it a "true" Bass plugin (pre-beta 3). Here's the whole segment of code, but I think the other stuff is irrellevant. It's tough to see here, but please take note of the lines beginning with ' as they are commented out. I realize I haven't yet filled in the 64 bit side of the equation because I first wanted to make sure the 32 bit stuff still worked before proceeding any further. Keep in mind that this is an app that has been in production for many months and works beautifully (as long as all the components are in the main program folder), so I'm 99% sure there's no other code that would affect this. I'm sure it's all an issue with the new folder location.
Imports Un4seen.Bass Imports Un4seen.Bass.AddOn.Video Module modBASS
Friend Sub INIT() ' BASS component initialize BassNet.Registration("not-going@to-say", "WONTREVEAL")
If IsOS64bit() Then Bass.BASS_PluginLoadDirectory(Application.StartupPath & "\bass64") Else Bass.LoadMe(Application.StartupPath & "\bass32\bass.dll") AddOn.Fx.BassFx.LoadMe(Application.StartupPath & "\bass32\bass_fx.dll") AddOn.Mix.BassMix.LoadMe(Application.StartupPath & "\bass32\bassmix.dll") 'AddOn.Video.BassVideo.LoadMe(Application.StartupPath & "\bass32\BassVideo.dll") 'AddOn.Wma.BassWma.LoadMe(Application.StartupPath & "\bass32\basswma.dll") 'AddOn.Aac.BassAac.LoadMe(Application.StartupPath & "\bass32\bass_aac.dll") Bass.BASS_PluginLoadDirectory(Application.StartupPath & "\bass32\") End If Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, frmMain.Handle, Nothing) AddOn.Video.BassVideo.BASS_Video_Init() 'Bass.BASS_SetConfig(BASSConfig.BASS_CONFIG_FLOATDSP, True) 'Bass.BASS_SetConfig(BASSConfig.BASS_CONFIG_WMA_BASSFILE, True) ' makes Bass handle WMA audio BassVideo.BASS_Video_SetConfig(BASSVIDEOConfig.BassVideo_Config_Renderer, BASSVIDEOOption.BassVideo_EVR)
End Sub
Friend Sub CLOSE() Bass.BASS_Free() End Sub
|
|
|
|
|
Logged
|
|
|
|
|
radio42
Posts: 4012
|
 |
« Reply #5 on: 19 May '09 - 13:22 » |
Quote
|
That might explains things: There was a bug in the "LoadMe" functions when accessing different directories, which was fixed in version 2.4.3.1 of BASS.NET. So I am affraid that's causing the problem in the older version you are using.
|
|
|
|
|
Logged
|
|
|
|
|
Latch
Posts: 89
|
 |
« Reply #6 on: 5 Jun '09 - 12:53 » |
Quote
|
That might explains things: There was a bug in the "LoadMe" functions when accessing different directories, which was fixed in version 2.4.3.1 of BASS.NET. So I am affraid that's causing the problem in the older version you are using.
Ok, then can you help me with the issue of upgrading Bass.Net. The reason I haven't upgraded the bass.net version is because the newer version supports the newer bassvideo, which, I don't want to use because since kenshin modified it to be a true bass plugin, its even more buggy than before. My question is (I guess), is will the newer bass.net still work with the older bassvideo if the function names still line up? ..and does that make sense what I'm saying?
|
|
|
|
|
Logged
|
|
|
|
|
Latch
Posts: 89
|
 |
« Reply #7 on: 7 Jun '09 - 18:29 » |
Quote
|
That might explains things: There was a bug in the "LoadMe" functions when accessing different directories, which was fixed in version 2.4.3.1 of BASS.NET. So I am affraid that's causing the problem in the older version you are using.
Try again. I just upgrading all the components one by one and still the same issue. I've trapped the error and it translates to "unable to open DLL "bass.dll" Even the LoadMe method on the regular bass library is returning false. The path IS correct. I've verified it multiple times. I'm now using the current version of bass.net (2.4.4.3). Any other suggestions?
|
|
|
|
|
Logged
|
|
|
|
|
radio42
Posts: 4012
|
 |
« Reply #8 on: 8 Jun '09 - 19:47 » |
Quote
|
I'll see, if I can somehow reproduce the issue...
|
|
|
|
|
Logged
|
|
|
|
|
radio42
Posts: 4012
|
 |
« Reply #9 on: 9 Jun '09 - 16:20 » |
Quote
|
Hi, I was actually unable to reproduce your issue. Can you please provide your full source code in question again here - especially your "IsOS64bit" method. And how have you compiled your .Net project? With the 'Any CPU' option? It looks like you have placed the x64 dlls into your main application folder. Have you tried to place them into a 'bass64' folder - like you did that with 'bass32'. You code should then look something like this: If Utils.Is64Bit Then Bass.LoadMe(Application.StartupPath & "\\bass64\\bass.dll") AddOn.Fx.BassFx.LoadMe(Application.StartupPath & "\\bass64\\bass_fx.dll") AddOn.Mix.BassMix.LoadMe(Application.StartupPath & "\\bass64\\bassmix.dll") Bass.BASS_PluginLoadDirectory(Application.StartupPath & "\\bass64\\addons") Else Bass.LoadMe(Application.StartupPath & "\\bass32\\bass.dll") AddOn.Fx.BassFx.LoadMe(Application.StartupPath & "\\bass32\\bass_fx.dll") AddOn.Mix.BassMix.LoadMe(Application.StartupPath & "\\bass32\\bassmix.dll") Bass.BASS_PluginLoadDirectory(Application.StartupPath & "\\bass32\\addons") End If
|
|
|
|
|
Logged
|
|
|
|
|
Latch
Posts: 89
|
 |
« Reply #10 on: 12 Jun '09 - 02:07 » |
Quote
|
Hi, I was actually unable to reproduce your issue. Can you please provide your full source code in question again here - especially your "IsOS64bit" method. And how have you compiled your .Net project? With the 'Any CPU' option? It looks like you have placed the x64 dlls into your main application folder. Have you tried to place them into a 'bass64' folder - like you did that with 'bass32'. You code should then look something like this: If Utils.Is64Bit Then Bass.LoadMe(Application.StartupPath & "\\bass64\\bass.dll") AddOn.Fx.BassFx.LoadMe(Application.StartupPath & "\\bass64\\bass_fx.dll") AddOn.Mix.BassMix.LoadMe(Application.StartupPath & "\\bass64\\bassmix.dll") Bass.BASS_PluginLoadDirectory(Application.StartupPath & "\\bass64\\addons") Else Bass.LoadMe(Application.StartupPath & "\\bass32\\bass.dll") AddOn.Fx.BassFx.LoadMe(Application.StartupPath & "\\bass32\\bass_fx.dll") AddOn.Mix.BassMix.LoadMe(Application.StartupPath & "\\bass32\\bassmix.dll") Bass.BASS_PluginLoadDirectory(Application.StartupPath & "\\bass32\\addons") End If
Friend Function IsOS64bit() As Boolean Return (IntPtr.Size =  End Function That isn't the problem. My machine is 32 bit and I just want to get the 32 bit side working first and yes I have traced the code and it is going to the 32 bit part. Assume everything is 32 bit and assume the code is branching correctly. I've already covered all those bases. Also, why are you putting double backslashes in your paths? In theory, that code won't work. Oh, and yes there is a bass64 folder as well and I already do have the 64 bit versions in there. I'm not even going to bother compiling and taking the program to a 64 bit machine to test until I know the 32 bit side works first. If bass.net can't function in this way, I don't want to waste any more time until I know it will be worth it to do this split. If it can't work, then I have to make 2 separate compiles, one for 32 bit and one for 64 bit, and I'll have to make two separate setups and downloads. That just doesn't make any sense to me and I would love for this to work. Evidently, I'm the first person attempting this or you surely would have had a quick answer. I hope you find the problem and either adjust your code or give me a workaround. I think this function is going to be important now that we are in the middle of this 32/64 transition and I think other developers would love this ability to make a single download work with either bit version of Windows.
|
|
|
|
|
Logged
|
|
|
|
|
radio42
Posts: 4012
|
 |
« Reply #11 on: 12 Jun '09 - 07:55 » |
Quote
|
Hi Latch,
I totally agree with you. BASS.NET definitly works on 32-bit as well as on 64-bit - other users are also using it this way. What I say is, that in my test app (compiled as for 'Any CPU') it is also working this way on a 32-bit OS as well as on a 64-bit OS. The reason for the 'LoadMe' methods are exactly for the case you described - to be able to ship just one app which runs on both OSs. As said, in my test app this is working just fine - that's why I can not reproduce your issue. I guess there must be any other difference between your app and my test app.
So can you may be provide a small sample app to demostrate your issue, so that I hopefully can reproduce your error here?
|
|
|
|
|
Logged
|
|
|
|
|
Latch
Posts: 89
|
 |
« Reply #12 on: 20 Jun '09 - 17:45 » |
Quote
|
Hi Latch,
I totally agree with you. BASS.NET definitly works on 32-bit as well as on 64-bit - other users are also using it this way. What I say is, that in my test app (compiled as for 'Any CPU') it is also working this way on a 32-bit OS as well as on a 64-bit OS. The reason for the 'LoadMe' methods are exactly for the case you described - to be able to ship just one app which runs on both OSs. As said, in my test app this is working just fine - that's why I can not reproduce your issue. I guess there must be any other difference between your app and my test app.
So can you may be provide a small sample app to demostrate your issue, so that I hopefully can reproduce your error here?
You still haven't answered why your code uses double backslashes for path separators.
|
|
|
|
|
Logged
|
|
|
|
|
radio42
Posts: 4012
|
 |
« Reply #13 on: 20 Jun '09 - 18:25 » |
Quote
|
Double slashes are standard path seperators for C#, since the single slash is used for an escape character, e.g. "\n". So to denote a real slash you'll need to use "\\" - just C#.
|
|
|
|
|
Logged
|
|
|
|
|
Latch
Posts: 89
|
 |
« Reply #14 on: 20 Jun '09 - 18:46 » |
Quote
|
Double slashes are standard path seperators for C#, since the single slash is used for an escape character, e.g. "\n". So to denote a real slash you'll need to use "\\" - just C#.
Ok, that makes perfect sense. Now, like I've said, my code has been traced thoroughly, and it is executed with the exact proper path. In theory, it should work. We need to narrow down why it's not. IT comes down to the few lines of code I've already shown you. I'm running Vista 32 bit. Have you tested with Vista 32 bit? Also, I'm using Visual Studio 2008 and compiling for the .Net framework 2.0. I'm telling you all these things because I want to make sure we are duplicating the same scenario. I am using VB also. In theory it shouldn't matter, but as we all know, leave it up to Microsoft to make theories not work.
|
|
|
|
|
Logged
|
|
|
|
|
radio42
Posts: 4012
|
 |
« Reply #15 on: 21 Jun '09 - 11:43 » |
Quote
|
I am using C# with VS2008 and have tested it on Windows XP, SP3, Windows Vista 32-bit and Vista 64-bit. So yes, BASS/BASS.NET definitly runs on Vista 32-bit!
A couple of more questions: a) what is the exact error you are getting? b) have you placed your 32 and 64 bit dlls into different sub-directories (e.g. bass32 and bass64)? c) have you seperated the loading stuff as shown in my example? d) please post your new sample code here, so that I can try reproducing it! e) what versions are you now using?
|
|
|
|
|
Logged
|
|
|
|
|
Latch
Posts: 89
|
 |
« Reply #16 on: 3 Jul '09 - 20:26 » |
Quote
|
I am using C# with VS2008 and have tested it on Windows XP, SP3, Windows Vista 32-bit and Vista 64-bit. So yes, BASS/BASS.NET definitly runs on Vista 32-bit!
A couple of more questions: a) what is the exact error you are getting? b) have you placed your 32 and 64 bit dlls into different sub-directories (e.g. bass32 and bass64)? c) have you seperated the loading stuff as shown in my example? d) please post your new sample code here, so that I can try reproducing it! e) what versions are you now using?
a) the error (as I already stated in a previous message) is "unable to open DLL "bass.dll" b) yes (as I've also stated in a previous message) c) yes d) once again, I already have. so please let me know where you think the problem is and what you think should be changed. e) bass version is 2.4.3.1 and bass.net is version 2.4.4.3
|
|
|
|
|
Logged
|
|
|
|
|
radio42
Posts: 4012
|
 |
« Reply #17 on: 6 Jul '09 - 10:37 » |
Quote
|
Hi Latch, I can only say, that in all my tests I do not get any error and all is working fine. So there must be something wrong with your code. Actually, I can not find your new and changed code anywhere here in the posts. The last code example you posted here (as already said) had a couple of issues. It was this one: If IsOS64bit() Then Bass.BASS_PluginLoadDirectory(Application.StartupPath & "\bass64") Else Bass.LoadMe(Application.StartupPath & "\bass32\bass.dll") AddOn.Fx.BassFx.LoadMe(Application.StartupPath & "\bass32\bass_fx.dll") AddOn.Mix.BassMix.LoadMe(Application.StartupPath & "\bass32\bassmix.dll") 'AddOn.Video.BassVideo.LoadMe(Application.StartupPath & "\bass32\BassVideo.dll") 'AddOn.Wma.BassWma.LoadMe(Application.StartupPath & "\bass32\basswma.dll") 'AddOn.Aac.BassAac.LoadMe(Application.StartupPath & "\bass32\bass_aac.dll") Bass.BASS_PluginLoadDirectory(Application.StartupPath & "\bass32\") End If
So please post your new and changed code again, so that I can take a look if there is something wrong. If your code is still the same as above, then the error makes totally sense, since you are ONLY calling Bass.LoadMe in the 64-bit case, but not for 32-bit! I advised you to change your code to this one: If Utils.Is64Bit Then Bass.LoadMe(Application.StartupPath & "\\bass64\\bass.dll") AddOn.Fx.BassFx.LoadMe(Application.StartupPath & "\\bass64\\bass_fx.dll") AddOn.Mix.BassMix.LoadMe(Application.StartupPath & "\\bass64\\bassmix.dll") Bass.BASS_PluginLoadDirectory(Application.StartupPath & "\\bass64\\addons") Else Bass.LoadMe(Application.StartupPath & "\\bass32\\bass.dll") AddOn.Fx.BassFx.LoadMe(Application.StartupPath & "\\bass32\\bass_fx.dll") AddOn.Mix.BassMix.LoadMe(Application.StartupPath & "\\bass32\\bassmix.dll") Bass.BASS_PluginLoadDirectory(Application.StartupPath & "\\bass32\\addons") End If
Have you done that? So I don't know, if your new and changed code looks exactly like my code, that's why I asked you to post your sample code again. AND of course you'd need to provide the 32-bit bass.dll to the "bass32" sub-directory and the 64-bit version to the "bass64" sub-directory. Have you done this? The error message you are getting only comes up, if the bass.dll actually can not found - so
|
|
|
|
|
Logged
|
|
|
|
|
Latch
Posts: 89
|
 |
« Reply #18 on: 11 Jul '09 - 05:11 » |
Quote
|
Hi Latch, I can only say, that in all my tests I do not get any error and all is working fine. So there must be something wrong with your code. Actually, I can not find your new and changed code anywhere here in the posts. The last code example you posted here (as already said) had a couple of issues. It was this one: If IsOS64bit() Then Bass.BASS_PluginLoadDirectory(Application.StartupPath & "\bass64") Else Bass.LoadMe(Application.StartupPath & "\bass32\bass.dll") AddOn.Fx.BassFx.LoadMe(Application.StartupPath & "\bass32\bass_fx.dll") AddOn.Mix.BassMix.LoadMe(Application.StartupPath & "\bass32\bassmix.dll") 'AddOn.Video.BassVideo.LoadMe(Application.StartupPath & "\bass32\BassVideo.dll") 'AddOn.Wma.BassWma.LoadMe(Application.StartupPath & "\bass32\basswma.dll") 'AddOn.Aac.BassAac.LoadMe(Application.StartupPath & "\bass32\bass_aac.dll") Bass.BASS_PluginLoadDirectory(Application.StartupPath & "\bass32\") End If
So please post your new and changed code again, so that I can take a look if there is something wrong. If your code is still the same as above, then the error makes totally sense, since you are ONLY calling Bass.LoadMe in the 64-bit case, but not for 32-bit! I advised you to change your code to this one: If Utils.Is64Bit Then Bass.LoadMe(Application.StartupPath & "\\bass64\\bass.dll") AddOn.Fx.BassFx.LoadMe(Application.StartupPath & "\\bass64\\bass_fx.dll") AddOn.Mix.BassMix.LoadMe(Application.StartupPath & "\\bass64\\bassmix.dll") Bass.BASS_PluginLoadDirectory(Application.StartupPath & "\\bass64\\addons") Else Bass.LoadMe(Application.StartupPath & "\\bass32\\bass.dll") AddOn.Fx.BassFx.LoadMe(Application.StartupPath & "\\bass32\\bass_fx.dll") AddOn.Mix.BassMix.LoadMe(Application.StartupPath & "\\bass32\\bassmix.dll") Bass.BASS_PluginLoadDirectory(Application.StartupPath & "\\bass32\\addons") End If
Have you done that? So I don't know, if your new and changed code looks exactly like my code, that's why I asked you to post your sample code again. AND of course you'd need to provide the 32-bit bass.dll to the "bass32" sub-directory and the 64-bit version to the "bass64" sub-directory. Have you done this? The error message you are getting only comes up, if the bass.dll actually can not found - so I changed it exactly like you have it but to no avail. I still think your double backslashes are wrong, but I tried both it and the normal single backslashes. All the LoadMe methods are returning false and the final Bass.BASS_PluginLoadDirectory(Application.StartupPath & "\\bass32") stops with the "unable to load bass.dll" error.
|
|
|
|
|
Logged
|
|
|
|
|
radio42
Posts: 4012
|
 |
« Reply #19 on: 12 Jul '09 - 11:05 » |
Quote
|
Hi Latch,
to move further with your issue, I think it might be usefull, if you provide me with a simple sample application (incl. source code in VB.Net). The sample should be very simple - just performing the loading and initialization. The sample should include all the 32-bit and 64-bit bass dlls you are using. With your sample I can see what is going wrong on my machines.
Regarding the double-slashes: I'm not a VB expert, so it might be that under VB single-slashes are okay - with C# you must provide double-slashes.
Btw: Do you get your errors only on a 64-OS or on both 32- and 64-bit OSs?
|
|
|
|
|
Logged
|
|
|
|
|
Latch
Posts: 89
|
 |
« Reply #20 on: 13 Jul '09 - 14:46 » |
Quote
|
Hi Latch,
to move further with your issue, I think it might be usefull, if you provide me with a simple sample application (incl. source code in VB.Net). The sample should be very simple - just performing the loading and initialization. The sample should include all the 32-bit and 64-bit bass dlls you are using. With your sample I can see what is going wrong on my machines.
Regarding the double-slashes: I'm not a VB expert, so it might be that under VB single-slashes are okay - with C# you must provide double-slashes.
Btw: Do you get your errors only on a 64-OS or on both 32- and 64-bit OSs?
I only have a 32 bit machine available, but I wanted to make sure the 32 bit side of the code worked before I even tried it on a 64 bit machine. I can't send you my source code, and considering you're the one who is the developer, I find it odd that I need to make a project for you to test. Isn't that your job? Look, I know your code is broken. I've been a developer since 1977 and have been using .Net and third party controls since they've existed. Why can't you simply look over your code with a fine tooth comb and find where the problem is? This should not be a major undertaking considering the simplicity of loading DLLs. I really don't think any one else is attempting this yet or I think we would have heard at least one person chime in with an answer on this thread. There is a workaround in which I could simply copy the appropriate DLLs from thier respective subfolder into the main folder upon launch, but, I'm assuming you'd rather have the opportunity to fix the problem at its source. If I'm wrong, let me know. I'll simply use the workaround and never bug you again.
|
|
|
|
|
Logged
|
|
|
|
|
radio42
Posts: 4012
|
 |
« Reply #21 on: 13 Jul '09 - 15:47 » |
Quote
|
a) I am the developer of BASS.NET b) I am not observing any issues here within my tests - that's why I assume it must be somewhere within your code/dlls c) It is absolutly NOT uncommon to provide a test app to demo the issue d) I know a few other developers who where trying to the same and they doesn't seem to have any issues - since they didn't report one e) but without any demo I seem to be unable to reproduce the error and can only say: here it is working fine on both 32-bit and 64-bit! f) I am not asking for your entire code - just a stripped down and very simple sample g) Again, I have already made a test app - but that is simply working fine h) So how should I fix something, which doesn't generate an error here? i) How can you be so sure, that my code is broken?
But since the statement in e) will not be of much help for you - I simply ask for a simple demo project. I guess that is the only way to see: - if you are calling all statements the right way - if only some or even only one of the add-ons dlls you are loading is the cause of the error - if there is mix in add-ons and/or plugins your are loading
I'm just willing to help...
|
|
|
|
|
Logged
|
|
|
|
|
Latch
Posts: 89
|
 |
« Reply #22 on: 14 Jul '09 - 03:54 » |
Quote
|
a) I am the developer of BASS.NET b) I am not observing any issues here within my tests - that's why I assume it must be somewhere within your code/dlls c) It is absolutly NOT uncommon to provide a test app to demo the issue d) I know a few other developers who where trying to the same and they doesn't seem to have any issues - since they didn't report one e) but without any demo I seem to be unable to reproduce the error and can only say: here it is working fine on both 32-bit and 64-bit! f) I am not asking for your entire code - just a stripped down and very simple sample g) Again, I have already made a test app - but that is simply working fine h) So how should I fix something, which doesn't generate an error here? i) How can you be so sure, that my code is broken?
But since the statement in e) will not be of much help for you - I simply ask for a simple demo project. I guess that is the only way to see: - if you are calling all statements the right way - if only some or even only one of the add-ons dlls you are loading is the cause of the error - if there is mix in add-ons and/or plugins your are loading
I'm just willing to help...
Nevermind. I'll use my own workaround. I'm sorry it took me two months to realize this.
|
|
|
|
|
Logged
|
|
|
|
|
radio42
Posts: 4012
|
 |
« Reply #23 on: 14 Jul '09 - 17:53 » |
Quote
|
Oki, just to proove that it is working fine (and that something else might be wrong on your side), here is my compete test app source code for you: It is in C#, but as you are a developer since 1977 it shouldn't be hard to convert - as said, I'm not a VB guy. using System; using System.IO; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Text; using System.Windows.Forms; using Un4seen.Bass; using Un4seen.Bass.AddOn.Fx; using Un4seen.Bass.AddOn.Tags; using Un4seen.Bass.Misc;
namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); }
private Dictionary<int, string> _loadedPlugIns; private void Form1_Load(object sender, EventArgs e) { if (Utils.Is64Bit) { if (Bass.LoadMe(Path.Combine(Application.StartupPath, "bass64"))) textBox1.AppendText("Bass.LoadMe successfull!\r\n"); if (BassFx.LoadMe(Path.Combine(Application.StartupPath, "bass64"))) textBox1.AppendText("BassFx.LoadMe successfull!\r\n"); _loadedPlugIns = Bass.BASS_PluginLoadDirectory(Path.Combine(Application.StartupPath, "bass64\\addons")); if (_loadedPlugIns.Count > 0) textBox1.AppendText("Bass.BASS_PluginLoadDirectory successfull!\r\n"); } else { if (Bass.LoadMe(Path.Combine(Application.StartupPath, "bass32"))) textBox1.AppendText("Bass.LoadMe successfull!\r\n"); if (BassFx.LoadMe(Path.Combine(Application.StartupPath, "bass32"))) textBox1.AppendText("BassFx.LoadMe successfull!\r\n"); _loadedPlugIns = Bass.BASS_PluginLoadDirectory(Path.Combine(Application.StartupPath, "bass32\\addons")); if (_loadedPlugIns.Count > 0) textBox1.AppendText("Bass.BASS_PluginLoadDirectory successfull!\r\n"); }
if (Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, this.Handle)) textBox1.AppendText("Bass.BASS_Init successfull!\r\n"); }
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { if (_loadedPlugIns != null) { foreach (int plugin in _loadedPlugIns.Keys) Bass.BASS_PluginFree(plugin); }
Bass.BASS_Free();
BassFx.FreeMe(); Bass.FreeMe(); }
} }
The code assumes a simple TextBox to be present on the form.
|
|
|
|
|
Logged
|
|
|
|
|