473,394 Members | 2,100 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,394 software developers and data experts.

.NET Remoting

I have a picture window that will capture the desktop image with the mouse X
& Y axsis. I would like to know how I can transmit or transport the remote
image from the remote machine to my local machine and into the same picture
window name and space? Also, are there any links to .NET remoting for VB?
Most of the things I've found including Ingo Rammer's book was VC# and I'm
just learning VB, and the two aren't even close in similarities that I can
see. All looks GREEK..LOL

Also, tips on sending bitmaps, textbox information, listbox and treeview box
information from one system to another using TCP would be greatly
appreciated. I don't want use any prefab dll's and or Active X controls,
since I don't know what's in them and the software I'm building will allow
access to people's computers for the purpose of repairing the potential
software exploits of spyware, adware, viruses etc. We are a nonprofit
organization developing this software internally.

Michael
May 16 '06 #1
2 1073
Hi Michael,

I think you may take a look at the sample below.
Managing Your Remote Windows Clipboard
http://msdn.microsoft.com/msdnmag/is...9/CuttingEdge/

Also many windows internal structure is not valid across process to say
nothing of across machine.
e.g. the Windows Hanlder(HWND), the Windows Hanlder is assigned by System.
i.e. we can not create a windows and assign a windows handler to it.
So the possible way is to marshal the content of a windows(e.g. the
Size,position, color and others you want), then another machine we can
create a windows and assign the values to it. e.g. the Size...)
Best regards,

Peter Huang

Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 28 '06 #2
Hi Michael,

Here is some code snippet for your reference.
[Client code]
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim chan As New TCPChannel(8086)
ChannelServices.RegisterChannel(chan, True)

Dim obj As TestObj

obj = CType(Activator.GetObject(GetType(TestObj),
"tcp://myserver:8085/SayHello"), TestObj)
Dim bt As Drawing.Bitmap = Bitmap.FromStream(obj.rtBitmap())
Console.WriteLine(bt.Height)
bt.Save("C:\" & TextBox1.Text & ".bmp")
Console.WriteLine("Save OK")
End Sub

[RemoteObj]
Imports System.Runtime.Remoting
Imports System.Drawing
Imports System.IO
Public Class TestObj
Inherits MarshalByRefObject
Public Function rtBitmap() As MemoryStream
Dim ms As New MemoryStream
Dim bmp As Bitmap = New Bitmap("C:\test.bmp")
bmp.Save(ms, Imaging.ImageFormat.Bmp)
Return ms
End Function
End Class

[Server]
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
' creating a custom formatter for your TcpChannel sink chain.
Dim provider As New BinaryServerFormatterSinkProvider
provider.TypeFilterLevel = TypeFilterLevel.Full

' creating the dictionary to set the port on the channel instance.
Dim props As New Hashtable
props("port") = 8085

' pass the props for the port setting and the server provider in
the server chain argument. (Client remains null (Nothing) here.)
Dim chan As New TcpChannel(props, Nothing, provider)
ChannelServices.RegisterChannel(chan, True)

RemotingConfiguration.RegisterWellKnownServiceType (GetType(TestObj),
"SayHello", WellKnownObjectMode.SingleCall)

System.Console.WriteLine("Hit <enter> to exit...")
System.Console.ReadLine()

End Sub

Best regards,

Peter Huang

Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 28 '06 #3

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

Similar topics

0
by: Sean Newton | last post by:
I am absolutely bewildered by now by the Microsoft.Samples SSPI and Security assemblies. I've been trying to set these up in a very straightforward harness in the way that I'd like to be able to...
0
by: bettervssremoting | last post by:
To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool This article makes a detailed comparison among SourceAnyWhere, SourceOffSite, VSS...
5
by: mayamorning123 | last post by:
A comparison among six VSS remote tools including SourceOffSite , SourceAnyWhere, VSS Connect, SourceXT, VSS Remoting, VSS.NET To view the full article, please visit...
0
by: bettervssremoting | last post by:
To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool including SourceOffSite, SourceAnyWhere and VSS Remoting This article makes a detailed...
4
by: Uchiha Jax | last post by:
Hello everyone, I am a plenty silly person who is trying to learn .NET remoting through trial and error (all articles I read are going over my head at the moment (mostly) so I thought i'd give...
0
by: bettervssremoting | last post by:
To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool This article makes a detailed comparison among SourceAnyWhere, SourceOffSite, VSS...
0
by: Martijn Damen | last post by:
Hi, At the moment I am trying to develop an application that uses another app over .net remoting and having some problems with it (ok, that is ofcourse why I am here), hope somebody can shine a...
8
by: Raju Joseph | last post by:
Hi All, I am just trying to get an opinion here. I know this is always a tough choice to make. We are in the process of converting our VB6 based Healthcare Information System (a full-fledged...
2
by: erbilkonuk | last post by:
Hi, I am very new to .NET Remoting and I try to run a simple program to subscribe to an event raised by Remoting Class. The Remoting Server initiates an instance of Remoting Class as Singleton /...
0
by: Kristian Reukauff | last post by:
Hi I have a problem with the .Net-Securty-Functions. I've got a client and a server. When I try to register a channel at the server with this line: ChannelServices.RegisterChannel(chan, false);...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
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...
0
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...

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.