473,385 Members | 1,676 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Remoting Bitmaps and Sound files

Hi, I'm looking for a way to remotely pass bitmaps and soundfiles via remoting. I have a class which contains a bitmap and I can easily access it remotely as long as I do not set a value for the bitmap. However, when i specify a value for the bitmap I get the 'Because of security restrictions, the type System.Runtime.Remoting.ObjRef cannot be accessed.' message. Now, I attempted to inherit from Bitmap to make it serializable but I am unable to inherit from that class. If anyone knows how to serialize a bitmap across the remoting boundary, your help would be greatly appreciated!

Thanks,
Tim
Nov 13 '05 #1
1 4930
Tim,

With a Bitmap, you can call the Save method on it to write to a Stream.
I would pass a MemoryStream to this method, and then extract the byte array
from the memory stream, sending that across the remoting boundary.

Then, on the other side, when you get the byte array, you can call the
static FromStream method on the Image class to get an instance of Image that
you can probably cast to Bitmap (depending on whether the underlying
representation was Bitmap or a Metafile).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"Tim Shih" <ts***@sensicast.com> wrote in message
news:e8****************@TK2MSFTNGP12.phx.gbl...
Hi, I'm looking for a way to remotely pass bitmaps and soundfiles via
remoting. I have a class which contains a bitmap and I can easily access it
remotely as long as I do not set a value for the bitmap. However, when i
specify a value for the bitmap I get the 'Because of security restrictions,
the type System.Runtime.Remoting.ObjRef cannot be accessed.' message. Now, I
attempted to inherit from Bitmap to make it serializable but I am unable to
inherit from that class. If anyone knows how to serialize a bitmap across
the remoting boundary, your help would be greatly appreciated!

Thanks,
Tim
Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: John | last post by:
Hello. If I wanted to make a website of sound files that are playable within the actual webpage, but people visiting the site can't save, or see the filenames so they can download from the site,...
0
by: WenChen | last post by:
Hi Is there a lib or code example for merging 2 sound files( wav or mp3 ) Thanks Wen
4
by: news microsoft | last post by:
Hello all, In my ASP.Net , C# web Application I have used the traditional upload code i.e. HTTP Method and it works fine for files and images up to 5 MB but once the size of file is more...
3
by: Bradley Jewell | last post by:
I am wanting to be able to take a templated sound file and superimpose other sound files overtop of it. If anyone has any idea's I would appreciate it.
1
by: andreas | last post by:
Hi, with imagelist it is possible to hide pictures files in a program is there a possibility to hide sound files (like wav) in a vb.net program? thanks for any response
6
by: laredotornado | last post by:
Hi, Is there a cross-browser way to play short (< 25K) sound files without spawning new windows or embedding any visual controls on the page? I would like to click a button and hear my short...
1
by: oops | last post by:
I've had no luck getting 2 sound files to start at the same time. the second one to start is delayed by about 3/4 of a second. Also would also prefer to start another clip a given point when one of...
1
by: praveen2gupta | last post by:
Hi I wants to store sound files in Oracle10g using blob datatype. Pls help me how can i store these .wav siles in the database
0
Ali Rizwan
by: Ali Rizwan | last post by:
Hi How to bind image or sound files in a single file that the application fetch them from a single file instead of multiple files.
0
by: leeogrady | last post by:
Is it possible to create a sound file (ie wav/mp3 or similar) from within vb2005? I import data from a excell file, i would then like to make a series of sound files, 1st file = first line read out...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.