21 May '13 - 11:22 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: Silverlight DLL please? :)  (Read 1022 times)
AName
Posts: 20


« on: 6 Jul '11 - 05:04 »
Reply with quoteQuote

Hey, I would like to use Bass.NET in my Silverlight application. Silverlight is basically a combination of C# and XAML code that can be run inside an internet browser. I can't use the DLL, however, because it wasn't "built against Silverlight".

Could you make a special Bass.NET Silverlight DLL? I understand that there are probably certain components that won't work in Silverlight, but what about the ones that will?

Thanks!
Logged
radio42
Posts: 4012


« Reply #1 on: 6 Jul '11 - 08:11 »
Reply with quoteQuote

I haven't played yet with Silverlight so I am not sure what and if that will be possible - but I'll put that onto the 'look-into-it' list!
Logged
ken
Posts: 630


« Reply #2 on: 8 Jul '11 - 15:55 »
Reply with quoteQuote

I haven't played yet with Silverlight so I am not sure what and if that will be possible - but I'll put that onto the 'look-into-it' list!

Please do Bernd, I to rely like to use BASS in Silverlight.

/Ken
Logged
jjohnston
Posts: 36


« Reply #3 on: 14 Jul '11 - 04:56 »
Reply with quoteQuote

This sounds like a pretty tough task. As far as I know, the only way Silverlight can call out to unmanaged code is through a COM object - and even that will present the user with a nasty prompt. It also requires the COM object to already be installed on the end-user's system. So, this means wrapping BASS in COM, then changing BASS.NET to use COM objects, and then dealing with a nasty prompt and getting the COM object on the user's machine. If you're just attempting to write a visualizer or the likes, Silverlight does provide some access to raw sample data that you can probably use.
Logged
radio42
Posts: 4012


« Reply #4 on: 14 Jul '11 - 09:42 »
Reply with quoteQuote

Yes, that is true, so far I didn't find a way to provide this by any means!
So I am not sure, if it will ever be possible to provide a BASS/Bass.Net version for Silverlight!

The problem is indeed, that:
a) BASS is not a COM object or provides a COM wrapper (and even if, which would be a huge effort, it would not solve the following)
b) the downstripped .Net Framework for Silverlight only provides very very limited unmanged marshaling operations which is not sufficient to provide all BASS functionality (so there would be a need for a special Silverlight BASS version as well!)
c) all the native (unmanaged) BASS libraries would need to be provided and installed to the client (running your silverlight app) as an already installed COM object
d) even if d) would somehow be possible it leaves you with the security issue

So up to now, that is now real chance to provide a Bass.Net version for Silverlight due to the above mentioned issues.
Logged
ken
Posts: 630


« Reply #5 on: 14 Jul '11 - 11:35 »
Reply with quoteQuote

How about when running Silverlight as "out of browser" (installing on desktop) with elevated rights?
Logged
radio42
Posts: 4012


« Reply #6 on: 14 Jul '11 - 12:01 »
Reply with quoteQuote

Same thing as already written above!
All the COM object stuff doesn't exist within BASS.
Logged
AName
Posts: 20


« Reply #7 on: 14 Jul '11 - 16:06 »
Reply with quoteQuote

Alright, thanks for trying lol. Perhaps in future Silverlight releases they will make it easier to implement DLL's like this...
Logged
jjohnston
Posts: 36


« Reply #8 on: 14 Jul '11 - 16:11 »
Reply with quoteQuote

If "out of browser" is an option, have you considered converting the silverlight project to WPF?  That sounds like a much more painless conversion. WPF will work splendidly with BASS.NET. Remember, even if all this COM-object stuff came to pass, it'd still be a Windows-only solution.

If you want to see code for a lot of the stuff Bass does, but written entirely in C#, you can check out NAudio on Codeplex. It's not as feature-rich as Bass, nor is it as fast (because it's entirely managed code) - but it may be a starting point for what you want to do in Silverlight.

I doubt Silverlight will change this model, as it really comes down to a security problem. Running something like BASS essentially means the application has full system control - which is something you definitely don't want from a webpage addon framework.
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines