Error when opening a file saved on a mapped drive

-1

I have a viewer to show my saved reports. Delphi XE7 works all right. But, on new version (Delphi Tokyo) it doesn't work.

if OpenDialog.Execute then 
   ShellExecute (0, nil, 'C:\C_Progs\CrystalViewer.exe', 
PWideChar('"' +OpenDialog.FileName+ '"'), nil, SW_ShowMaximized);

It's curious, since it only occurs when I select a file from a mapped drive.

ERROR: The application was unable to start correctly (0xc0000001). Click OK to close the application

delphi
delphi-10.2-tokyo
asked on Stack Overflow Aug 7, 2018 by Seeko • edited Aug 7, 2018 by LU RD

1 Answer

-1

Solution: i was used the TOpenDialog component, but i changed to TFileOpenDialog. I don't understand why, but it worked.

answered on Stack Overflow Aug 7, 2018 by Seeko

User contributions licensed under CC BY-SA 3.0