Ver Mensaje Individual
  #5  
Antiguo 06-10-2014
ASAPLTDA ASAPLTDA is offline
Miembro
 
Registrado: jun 2003
Ubicación: COLOMBIA-CALI
Posts: 639
Reputación: 21
ASAPLTDA Va por buen camino
Talking ShellExecute + Nombre (Folder / Carpeta) con espacios Solucionado

Cita:
Empezado por Al González Ver Mensaje
Aunque el código que pones no muestra exactamente lo que mencionas, creo que logra comprenderse el problema. La solución es incluir comillas dobles (") al inicio y al final de la ruta. Espero te sea de utilidad.
Saludos.
Gracias Al gonzalez, por su rápida soporte y funciono la llamada externa , coloco el código que uso como referencia propia y de otros foristas
Solucion al problema use comillas Dobles para encerrar la ruta del ejecutable
Código Delphi [-]


 T_string:= ExtractFilePath(Application.ExeName) + 'SERVINETCOMPRY.exe' ;
 T_string:= char(34) +  T_string +  char(34);   // char(34) = '"';

// el valor de T_string   es :   'C:\SERVINET2014 X2\DELPHI\SERVINETCOMPRY.exe'     D.USUARIO = tipo string
 W_ERROR:= ShellExecute(Handle, 'open', PChar(T_string) , PChar(D.USUARIO )   , '', SW_SHOWNORMAL );

el codigo de retorno es 2 el cual encontre el un foro significa archivo no encontrado, en el folder principal hay 1 espacio

Agradezco nuevamente el tiempo que se toma en proveernos soporte

Adjunto Codigos de errores del shellExecute encontrado en otro link externo al foro
Here is a complete list of the possible return values of ShellExecute:
http://tekreaders.com/blog/2011/08/0...-applications/

0 = The operating system is out of memory or resources.
2 = The specified file was not found
3 = The specified path was not found.
5 = Windows 95 only: The operating system denied access to the specified file
8 = Windows 95 only: There was not enough memory to complete the operation.
10 = Wrong Windows version
11 = The .EXE file is invalid (non-Win32 .EXE or error in .EXE image)
12 = Application was designed for a different operating system
13 = Application was designed for MS-DOS 4.0
15 = Attempt to load a real-mode program
16 = Attempt to load a second instance of an application with non-readonly data segments.
19 = Attempt to load a compressed application file.
20 = Dynamic-link library (DLL) file failure.
26 = A sharing violation occurred.
27 = The filename association is incomplete or invalid.
28 = The DDE transaction could not be completed because the request timed out.
29 = The DDE transaction failed.
30 = The DDE transaction could not be completed because other DDE transactions were being processed.
31 = There is no application associated with the given filename extension.
32 = Windows 95 only: The specified dynamic-link library was not found.
Responder Con Cita