Use a struct within a remotingObject
From: Kai Huener (mail_at_kaihuener.de)
Date: 06/25/04
- Next message: learn_remoting: "Sinking in .Net Remoting"
- Previous message: Willie wjb: "Re: server calls client, client calls server problem."
- Next in thread: Sunny: "Re: Use a struct within a remotingObject"
- Reply: Sunny: "Re: Use a struct within a remotingObject"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: learn_remoting: "Sinking in .Net Remoting"
- Previous message: Willie wjb: "Re: server calls client, client calls server problem."
- Next in thread: Sunny: "Re: Use a struct within a remotingObject"
- Reply: Sunny: "Re: Use a struct within a remotingObject"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|