I have a Delphi 2010 exe that launches a second exe. In the second exe, there is a dialog that calls openDialog.execute. When this runs under Windows 2008 Enterprise R2 under a remote desktop, it runs as expected, but when run as a remote application, as soon as the file dialog pops up, the application hangs, turning all of the application windows white. The only way to get out of it is to terminate the application. I tried replacing TOpenDialog with TFileOpenDialog, the results are the same. I've looked into modifying the RDP file that launches the main application, but cannot see any parameters there that would make a difference. Has anyone ever seen this kind of behavior before?
2010.07.13 Updated
This is reproducable using a simple example. There are two executable files in the example. The first is a file launcher, called m_module.exe, which contains one edit, one button, and the code below. I change the name of the executable file in the edit to match the second executable before I click the launch button:
procedure TForm1.Button1Click(Sender: TObject);
begin
ShellExecute(Handle, 'open', stringToOLEstr(edit1.text) , nil, nil, SW_SHOWNORMAL) ;
end;
procedure TForm1.FormShow(Sender: TObject);
begin
edit1.text:=application.exename;
end;
The second executable contains a button and the code below:
procedure TForm1.Button1Click(Sender: TObject);
begin
OpenDialog1.execute;
end;
The first module is launched from an RDP file.
2010.07.14 Updated
I have discovered that if I copy the following dlls:
thumbcache.dll
dtsh.dll
wkscli.dll
from the \Windows\System32 folder into the application folder, the problem is eliminated.
I've further discovered that changing ownership and permission levels of these dlls in the \Windows\System32 folder from