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
1
vote
1 answer

Caller ID within a MarshalByReferenceObject called by remoting

I have a MarshalByReferenceObject, whose methods are called via .net remoting. public class MyServer : MarshalByReferenceObject { public void DoSomething(); } System.Runtime.Remoting.RemotingConfiguration.RegisterWellKnownServiceType( …
HugoRune
  • 13,157
  • 7
  • 69
  • 144
1
vote
4 answers

Using an abstract class as the contract in plugin framework

Can an abstract class be used as the contract object between a 'Host' and a 'plugin'? The idea is that the plugin inherits the contract (we call it an adapter). We are also understanding that all participants in the framework must inherit…
IAbstract
  • 19,551
  • 15
  • 98
  • 146
1
vote
2 answers

Creative use of MarshalByRefObject

I've been banging my head trying to figure some things out. So, I'm looking for advice and research material (via links). Here's the scenario: We have a library (say, CommonLib) that contains resources needed by several other applications (say,…
IAbstract
  • 19,551
  • 15
  • 98
  • 146
1
vote
2 answers

how to use MarshalByRefObject to call class in different app domain

I am trying to implement a version of example 1 from here http://msdn.microsoft.com/en-us/library/System.MarshalByRefObject(v=vs.110).aspx into my code. My aim is to have a class with some methods then load that class into a different appdomain and…
user1348463
  • 87
  • 1
  • 1
  • 8
1
vote
0 answers

Passing vb.net object byref to unmanaged code

I am rasing an event from managed vb.net code which is being handled in unmanaged vc++ code. Below is the code line : Dim pCALMarkups as Object RaiseEvent RequestEISData(nOrdinal, pCALMarkups, eMarkupCreateSecurity, eMarkupModifySecurity,…
ashish_pal
  • 217
  • 1
  • 4
  • 11
1
vote
1 answer

SCardGetCardTypeProviderName return empty results

I'm trying to use the SCardGetCardTypeProviderName using interop in C#. One of the parameters is a reference, that is supposed to return the name of the provider for a smart card according to the card context that is passed in. This is the code…
Random
  • 1,896
  • 3
  • 21
  • 33
1
vote
2 answers

AppDomain.CreateInstanceAndUnwrap not working in a website

I have a very simple class CompiledFunction (MarshalByRefObject) - I try to create an instance of this in a new domain like so var appDomainSetup = new AppDomainSetup(); appDomainSetup.ApplicationBase =…
Peter Morris
  • 20,174
  • 9
  • 81
  • 146
0
votes
1 answer

C# .NET Remoting Best Practice?

Ok so I know I am very very new to .NET remoting and I have a question as far as best practice goes. First, I already have an in-house application that I have built and have dll's that I reference that handle all of the data for me. I want the…
Steven Combs
  • 1,890
  • 6
  • 29
  • 54
0
votes
1 answer

Serializable Objects with MarshalByRefObject Fields

Alright, I'm not sure if this question has been asked before so if it has then flame away. Lets say we have two classes like this [Serializable] public class ClassA { private string _name; private ClassB _data; } public class ClassB :…
Zerodestiny
  • 196
  • 3
  • 10
0
votes
0 answers

When invoke WriteLine method of TraceListener, is the method executed asynchronously?

recently I found our company product (based on .net framework) uses Tracelistenser Class's (under the System.Diagnostics) WriteLine method. foreach(TraceListener item in traceSource.Listeners) { item.WriteLine($"..."); item.Flush; } Because…
0
votes
1 answer

How is MarshalByRefObject implemented?

I would like to know how the MarshalByRefObject is implimented and why does it make it possible to pass objects by reference in remoting. Is it possible because of the implementation of the MarshalByRefObject class, or does the remoting libraries…
idan
  • 1
0
votes
1 answer

mySQL error with plugin loaded into appDomain

I am struggling to get dynamic loading working with my plugin. I'm loading the plugin into an appdomain but I get the following exception when my plugin tries to execute any mySQL code: MySql.Data.MySqlClient.MySqlException was unhandled …
0
votes
0 answers

Interop object throws exception If two session of applications are open in C++

I am using System::Runtime::InteropServices::Marshal::GetActiveObject(MyApplication); to initialize my Interop object. When I open two sessions of application and in second session, call the function of interop object, it throws following exception…
0
votes
0 answers

Windows form application c++, faster setPixel operation from 2D Buffer to managed Bitmap object

I drew an image from 2 D buffer with height = 768 and width = 1024. After that step I will display a video (25 Hz) and so I try to get faster code for displaying image. The biggest problem is creating Bitmap with Bitmap->setPixel operation. How can…
0
votes
1 answer

Pass a "non-serialized" object to another appdomain without Serilization/Deserialization (C#)

What is the best way for passing a "non-serialized" object to another appdomain without Serilization/Deserialization ? More detail: I'm going to invoke a function (from external assembly/plugin) in new appdomain and pass the result to main appdomain…