Use a struct within a remotingObject

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Kai Huener (mail_at_kaihuener.de)
Date: 06/25/04


Date: 25 Jun 2004 02:57:43 -0700

Hello,

I want to use a self defined struct within a remoteObject in the
following way to send data from an AddIn in VisualStudio to an AddIn
in MS Word:

...
public class Remote Object : MarshalByRefObject
{
   ...
   public ArrayList GetCodeElements()
   {
      ...
      ArrayList retval = new ArrayList();
      foreach(...)
      {
         StructElement strEl = new StructElement();
         strEl.Name = "TestName";
         retval.Add(strEl);
      }
      return retval;
   }
   ...
}

[Serializable]
public struct StructElement
{
   ...
   private string name;
   
   public string Name
   {
      get { return this.name; }
      set { this.name = value; }
   }
   ...
}

When I try all this without the struct in the returning ArrayList only
by using a single string, it works, so I think the remote call by
client is ok. Also there are no problems, when I use a ConsoleApp as
Client and not the AddIn in Word. But when I call the relevant
function out of the Word AddIn, I get an "unmanaged exception" with
the message "The XML-key ... StructElement is not assigned by an
assembly" (my own translation from german to english, sorry :-))

Have you any idea, what I have to do to solve this problem?

Kai Huener



Relevant Pages

  • Re: Use a struct within a remotingObject
    ... which your struct is defined. ... > following way to send data from an AddIn in VisualStudio to an AddIn ... > private string name; ... > client is ok. ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: Use a struct within a remotingObject
    ... Yes, the assembly references all are correct, whenn I use the code in a ... console Application, there are no problems. ... > which your struct is defined. ... >> following way to send data from an AddIn in VisualStudio to an AddIn ...
    (microsoft.public.dotnet.framework.remoting)
  • [1/2] POHMELFS - network filesystem with local coherent cache.
    ... POHMELFS stands for Parallel Optimized Host Message Exchange ... It allows to mount remote servers to local ... * GNU General Public License for more details. ... +struct pohmelfs_config ...
    (Linux-Kernel)
  • [2/3] Distributed storage. Network state machine.
    ... * GNU General Public License for more details. ... +struct kst_poll_helper ... * This function removes request from state tree and ordering list. ... * which in turn host requests for remote targets. ...
    (Linux-Kernel)
  • Remoting a Hashtable contain a Hashtable ?
    ... I'm trying to remote a Hashtable (object key, ... public interface ITheFilterRemoteObject ... public struct PLowHigh ...
    (microsoft.public.dotnet.framework.remoting)