The following code worked fine in Delphi 2010. I recently moved to Delphi XE. I am attempting to launch another application from within a Delphi app.
if ShellExecute(0, nil, PChar('c:\temp\newapp.exe), nil, nil, SW_SHOW) <= 32 then
Application.MessageBox('Couldn''t execute the application',
This will return an error that says"The program or feature "\??\c:\temp\newapp.exe" cannot start or run due to incompatibility with 64 bit version of Windows.
The error message comes up because the PChar typecast is placing "\??\" in front of the string "c:\temp\newapp.exe".
I believe it may be something in Delphi XE that I must turn off or turn on, but I have no idea.
I can duplicate this problem in a simple app everytime using ShellExecute.
Who can help me? I am running a 64-bit machine with Windows 7.
Lee Mc Cauley