views:

489

answers:

4

I have a WPF application which has a DirectX component within it. This component does not work over Remote Desktop--it just shows a corrupted image. The application works fine when not using Remote Desktop.

In trying to debug the problem I installed the February 2010 DirectX SDK. Now, when I run the program on the computer with the SDK and Remote Desktop to it from a separate computer, the component works just fine. However the opposite does not work--trying to use the application over Remote Desktop when it is running on the computer without the DirectX SDK (it has the original problem with the corrupted image).

I have already compared the loaded DLLs (using Process Explorer) between running the application on my SDK machine and non-SDK machine. They both are loading the same DLL versions.

What else could be causing this behavior?


EDIT: I have discovered that the application actually is loading a different DLL. I didn't notice because I didn't capture the DLL list properly. When I run the application on the machine with the SDK it loads D3DREF9.dll, the DirectX reference rasterizer. This gives me a clue as to what the problem is, although I am still working out the solution.

A: 

Are you using the same display color depth on both systems?

SamB
Yes, both systems are set to 32-bit color.
emddudley
A: 

Try reducing the performance/experience display options in RemDesk. I'd start with turning off Bitmap Caching, reducing the color depth, etc..

Chris Thornton
I tried changing the Remote Desktop session to use 16-bit color and turned off Bitmap Caching, but it did not make a difference.
emddudley
Try disabling DirectX video in the display properties of the machine running the app. This is useful for things like DVD playback apps that can't be screen-captured (otherwise you get a black rectangle). Maybe the same issue here.
Chris Thornton
A: 

http://www.virtualdub.org/blog/pivot/entry.php?id=208

http://discussms.hosting.lsoft.com/SCRIPTS/WA-MSD.EXE?A2=ind0805B&L=DIRECTXDEV&P=R2550&1=DIRECTXDEV&9=A&J=on&d=No+Match;Match;Matches&z=4

Goz
I did not specify, but I need to support XP to XP. Full software rendering would be acceptable in my case.
emddudley
Well it doesn't seem to be possible. So whether you need it or not you may have a bit of a problem.
Goz
A: 

It turns out that the application that I was maintaining was attempting to create a DirectX Hardware device, and if that failed, it would attempt to create a Reference device, and finally, if both of those failed, it would create a Software device.

There is no Reference or Software renderer available on systems by default. To get a Reference renderer the DirectX SDK must be installed--and you're only supposed to use it for debugging, not deployment. For a software renderer, the system only needs .NET 3.5 SP1 and then the software must load it.

Basically I believe the problem was that the software was failing to create the rendering device properly. I've cleaned up the initialization code and it renders over Remote Desktop just fine now.

emddudley