Hi
I have a problem with serializing IntPtr as an out parameter during remote call - If I have a remote object with method that returns IntPtr, then BinaryFormatter can't serialize the return message. I've spent some time to research the problem (thanks .NET reflector) and find out that the BinaryFormatter serializes objects that implement the IMethodReturnMessage in a special way, and if this message has IntPtr in the list of out arguments, then BinarySerializer throws the following exception SerializationException (Invalid type code in stream 'Invalid'.).
You can easily reproduce this case with the following code:
ReturnMessage message = new ReturnMessage(null, new Object[] { IntPtr.Zero }, 1, null, null);
BinaryFormatter formatter = new BinaryFormatter();
MemoryStream stream = new MemoryStream();
formatter.Serialize(stream, message); // Here the exception is thrown
So the question is how to return the IntPtr from the remote method

Serialization IntPtr as out parameter
EddieMu
It would help if you could provide the following information:
1. The method signature of the remote method.
2. The framework version (1.1 or 2.0)
Thanks
Sowmy
2c
KitGreen