I'm updating an old c++ service to use WCF instead of RPC and there is an issue as to what type to use when sending and receiving a handle (HANDLE, void*..etc). In the updated service I currently have it using IntPtr, but this does not work when going from a 64 bit version of the service to a 32 bit version. The IntPtr can not deserialize because internally it is just a void* which will be different depending on which environment you run in.
This solves the problem because the RPC infrastructure never actually sends the handle value, rather a GUID that references the handle. This process is described in the following article:
I'm looking for a WCF equivalent to this functionality. I could write similar logic myself on the service to do this, or even just change the IntPtr to a Int64, but I'm hoping there is something similar to RPC way.
Thanks for the help