• Advertisement
Sign in to follow this  

SharpDX Sharing textures between 32-bit and 64-bit process

This topic is 1639 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement