473,327 Members | 1,920 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,327 software developers and data experts.

Marshal by value

Is there somebody who can guid me to an example of marshal by value
implementation of remote object?.
I have read a lot of docs but they are mostly focused on marshal by ref and
there is no complete implementation of marshal by value.

Thanks for your help.
ALI
Nov 16 '05 #1
3 5572
Hi,

I think it is enough to mark the object with the [Serializable] attribute
and make sure the object has a default parameterless constructor and that
all public properties have getters and setters and are of serializable
types.

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

"ALI-R" <ne****@microsoft.com> wrote in message
news:O9**************@tk2msftngp13.phx.gbl...
Is there somebody who can guid me to an example of marshal by value
implementation of remote object?.
I have read a lot of docs but they are mostly focused on marshal by ref
and
there is no complete implementation of marshal by value.

Thanks for your help.
ALI


Nov 16 '05 #2
I have marked my remote class to be serilized and it has a blank constructo
and I am using my own host
,everything is fine I can get a soap description of my remote object by the
following
url: http://myserver:8085/VS02?wsdl
My problem is that in client when I reference the remote object because I
have a reference to copy of remote object in my computer ,it makes the
reference from my cleint not the reference.here is cient code and
configuration file.
*********** Code**********
<system.runtime.remoting>
<application name="VersionClient">
<client>
<wellknown mode="Singleton" type=
"VersionServer.Test,VersionServer" url=http://myserver:8085/VS02/>
</client>
</application>
*************************

*********Client Config fiel***
InitializeComponent();
RemotingConfiguration.Configure(
@"VersionClient.exe.config");
objRemote = new VersionServer.Test(); <-- it makes the refernece from copy
of the object in my computer
*************************
Thanks for your help!
Ali

"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote
in message news:OA**************@TK2MSFTNGP15.phx.gbl...
Hi,

I think it is enough to mark the object with the [Serializable] attribute
and make sure the object has a default parameterless constructor and that
all public properties have getters and setters and are of serializable
types.

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

"ALI-R" <ne****@microsoft.com> wrote in message
news:O9**************@tk2msftngp13.phx.gbl...
Is there somebody who can guid me to an example of marshal by value
implementation of remote object?.
I have read a lot of docs but they are mostly focused on marshal by ref
and
there is no complete implementation of marshal by value.

Thanks for your help.
ALI

Nov 16 '05 #3
,Bythe way from the link below your response I went to X-Unity website and
downloaded the evaluation version.
can you tell me what the difference is between and for instance n-unit ??
I don't know to use it in my application,can you give more info??
"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote
in message news:OA**************@TK2MSFTNGP15.phx.gbl...
Hi,

I think it is enough to mark the object with the [Serializable] attribute
and make sure the object has a default parameterless constructor and that
all public properties have getters and setters and are of serializable
types.

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

"ALI-R" <ne****@microsoft.com> wrote in message
news:O9**************@tk2msftngp13.phx.gbl...
Is there somebody who can guid me to an example of marshal by value
implementation of remote object?.
I have read a lot of docs but they are mostly focused on marshal by ref
and
there is no complete implementation of marshal by value.

Thanks for your help.
ALI

Nov 16 '05 #4

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

Similar topics

3
by: syd | last post by:
Hello all, In my project, I have container classes holding lists of item classes. For example, a container class myLibrary might hold a list of item classes myNation and associated variables...
4
by: William Stacey | last post by:
Using the following struct def, how can I tell (using reflection) if "ba" has the marshal attribute and get the "ByValArray" and maybe even the size? In the bigger picture, given a struct (or a...
9
by: Angel | last post by:
Hi again, I'm trying to call functions from a proprietary DLL but it's turned out to be more difficult than I thought. I have this W32.DLL which was written in C by USPS. They don't provide the...
3
by: Tom | last post by:
I think I'm still a little rough on the principle and understanding of Marshal by value and Marshal by reference after reading various materials. my understanding of Marshal by value is that the...
6
by: SB | last post by:
I feel dumb to ask because I bet this is a simple question... Looking at the code below, can someone please explain why I get two different values in my Marshal.SizeOf calls (see the commented...
6
by: Howard Kaikow | last post by:
Given: private struct PROCESSENTRY32 { public int dwSize; public int cntUsage; public int th32ProcessID; public int th32DefaultHeapID; public int th32ModuleID;
6
by: william.thorpe.b | last post by:
I have recently switched from VS2003 to VS2005 and at the same time from V1 to V2 of the .NET Compact Framework. The target is a Windows CE 5.0 device and an ARMV4I processor. ...
5
by: Anurag | last post by:
I have been chasing a problem in my code since hours and it bolis down to this import marshal marshal.dumps(str(123)) != marshal.dumps(str("123")) Can someone please tell me why? when...
0
by: Charming12 | last post by:
Hi All, I have a strange problem and due to my inefficiency with IntPtr i am unable to figure it out. I have an structure something like: public struct Detail { public int age; public...
0
by: xrxst32 | last post by:
Hello there, I have some doubts about the best practice for using COM automation, the Runtime Callable Wrapper (RCW) and Marshal.ReleaseComObject. So the question is/are: Do I need to release...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.