473,582 Members | 3,083 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4944
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************* *@exisconsultin g.com

"Tim Shih" <ts***@sensicas t.com> wrote in message
news:e8******** ********@TK2MSF TNGP12.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
2884
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, is this possible? What would be the best format to save the sound clips in? I would need something that doesn't take up too much space but is...
0
906
by: WenChen | last post by:
Hi Is there a lib or code example for merging 2 sound files( wav or mp3 ) Thanks Wen
4
4401
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 than 5 MB it gives a error mostly time out error and also uploading sound files (.mp3, .wma, .dat) is not allowed.
3
1017
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
1159
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
1976
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 sound. Thanks for your help, - Dave ps - Searching Google turned up stuff for Netsacpe and IE 3, but I was hoping more for IE 7 and Firefox.
1
1258
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 the others is still playing. If anyone knows of a link to a similar issue could you please spare the time to post it? come on, you've read this far...
1
1771
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
874
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
868
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 using speechlib, 2nd file = 2nd line read out using speechlib... through the whold file Any advice would be much appriciated many thanks Lee
0
7886
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7809
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8159
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8312
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7920
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6569
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5366
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2312
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1147
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.