I have a bit of a strange use case. My application uses 2 processes. One process is 32-bit and will create a texture (IDirect3DSurface9, i.e. SharpDX.Direct3D9.Surface) for sharing. It will send the shared handle to another process which is 64-bit and also uses SharpDX. From this process it will read the shared handle and attempt to open the shared texture. Ultimately the use case is that the 32-bit process writes into the texture using some unmanaged 32-bit libraries, and the 64-bit process displays the texture using AnyCPU/64-bit libraries.
I wonder if this can work at all considering IntPtr is 64-bit on 64-bit processes and 32-bit on 32-bit processes, and this is the type used to represent shared texture handles in SharpDX. Direct3D is a 32-bit-only API, right? Therefore the upper 32 bits of an IntPtr used to store a Direct3D handle should be unused, right?
Edited by Asik, 27 August 2013 - 12:20 PM.