Questions tagged [marshalbyrefobject]

MarshalByRefObject Class enables access to objects across application domain boundaries in applications that support remoting.

MarshalByRefObject is the base class for objects that communicate across application domain boundaries by exchanging messages using a proxy. Objects that do not inherit from MarshalByRefObject are implicitly marshal by value. When a remote application references a marshal by value object, a copy of the object is passed across application domain boundaries.

MarshalByRefObject objects are accessed directly within the boundaries of the local application domain. The first time an application in a remote application domain accesses a MarshalByRefObject, a proxy is passed to the remote application. Subsequent calls on the proxy are marshaled back to the object residing in the local application domain.

http://msdn.microsoft.com/en-us/library/system.marshalbyrefobject.aspx

76 questions
0
votes
0 answers

Is it OK to override MarshalByRefObject#Equals?

The documentation for MarshalByRefObject states, When you derive an object from MarshalByRefObject for use across application domain boundaries, you should not override any of its members, nor should you call its methods directly. Does this…
StackOverthrow
  • 1,158
  • 11
  • 23
0
votes
0 answers

Access Instance of a Class from a differente Process in C#

I have a project called "Core" that declares an Interface. And i have a project called "Service" that instantiates a class that implements that interface (it references the "Core" project on it's dependencies). Both projects run independently, as i…
SammuelMiranda
  • 420
  • 4
  • 29
0
votes
1 answer

xamarin forms ... cannot get parameter value from SqlCommand ... error "MarshalByRefObject" claims it is defined in 'mscorlib' .. could not be found

I have a xamarin.forms project. In the PCL I have a class with these 3 lines of code .... 1) SqlCommand cmd = new SqlCommand(); .... (Note: this line of code works) 2) cmd.Parameters.Add(new SqlParameter("@UserID", SqlDbType.Char, 5)).Direction =…
0
votes
1 answer

MarshalByRefObject causing C++ program to hang

I have a client program that uses a MarshalByRefObject to get a variable from a remote server. Sometimes the program hoses up on the remote server and when I try to get that variable my client program simply hangs. Is there a way to time out the…
LightLabyrinth
  • 362
  • 3
  • 14
0
votes
1 answer

Find main class that inherits from X without using GetTypes?

I have an application that load plugins on-demand(uses AppDomain and MarshalByRefObject) and I am trying to find a different way to validate a plugin. Right now, I identify run-able plugins like this: _pluginAassembly =…
Guapo
  • 3,446
  • 9
  • 36
  • 63
0
votes
1 answer

Can't set synchronization context when using appdomains

I have a custom framework where a host application runs an event loop and loads a guest application into a separate app-domain. The guest application has means to take advantage of the event loop via a provided API. I want to make the guest…
0
votes
1 answer

Unable to create object in another appdomain when invoking C# using C++

I have created a C# code with output type as netmodule. This is being used in a C++ code. I want to create an object of the same assembly which is already loaded. But, in a separate AppDomain. But when doing this, I am unable to load the assembly to…
Santron Manibharathi
  • 628
  • 5
  • 12
  • 26
0
votes
1 answer

Conflicting dependencies when loading an assembly

I am having some issues when trying to write a plugin handler. I have a main application "AppA", that references "AssemblyX". AppA also loads a number of plugin assemblies that implement "IPlugin" interface. However, these plugins might also…
Langers
  • 141
  • 1
  • 9
0
votes
2 answers

Why can't pass Marshaled interface as integer(or pointer)

I passed ref of interface from Visio Add-ins to MyCOMServer (Interface Marshalling in Delphi have to pass interface as pointer in internals method of MyCOMServer. I try to pass interface to internal method as pointer of interface, but after back…
Semyon.Khmelev
  • 197
  • 1
  • 14
0
votes
1 answer

manage memory using marshalbyrefobject

I have a method that performs a search in both the local assembly and in the current directory. It is looking for a class based on the name provided (reflection). However I now want to only load the classes/dlls that I am looking for into memory as…
user1348463
  • 87
  • 1
  • 1
  • 8
0
votes
0 answers

C# Plugin using MarshalByRefObject creating multiple copies

I am putting together a plugin framework with these requirements: load/unload plugins at will call methods in loaded plugins raise callback events from plugin to the owner To do this I am creating a new AppDomain, and loading the Plugin…
qtime67
  • 317
  • 5
  • 21
0
votes
1 answer

Remoting references by wrapping them in a MarshalByRefObject? Will it work?

I'm trying to implement a plugin system using MAF. The objects I want to pass currently aren't serializable though, and even though I'm sure I could make them serializable I don't think it would be very performant. Two questions: 1) In order for…
Brandon Moore
  • 8,590
  • 15
  • 65
  • 120
0
votes
0 answers

Boolean members having true value by default in .NET remoting

I am using .NET Remoting. I have a class which has some pubilc boolean members and set them to false at the time of declaration itself. This class inherits from MarshalByRefObject class. When I access this class object in the client app, all these…
Brij
  • 11,731
  • 22
  • 78
  • 116
0
votes
3 answers

Why does System.Drawing.Drawing2D.Matrix derive from MarshalByRefObject?

Why is Matrix a heavyweight class derived from MarshalByRefObject instead of a lightweight struct?
Ansis Māliņš
  • 1,684
  • 15
  • 35
0
votes
1 answer

cross-AppDomain event issues

I use the following helper class with POS for .Net to get a reference to the hardware in a separate AppDomain (getting around some limitations of requiring public static class PosHelper { private…
Chris Klepeis
  • 9,783
  • 16
  • 83
  • 149