Autor Beitrag
Christoph Englmann
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 276



BeitragVerfasst: Di 08.03.05 14:38 
Hallo,

möchte aus meinem Delphi Programm heraus ein weiteres Delphi Programm starten und dabei einen Parameter (Variable) übergeben...
habs folgendermaßen versucht:

ausblenden Delphi-Quelltext
1:
shellexecute(application.handle, 'open''c:\001\test.exe Parameter1','','',sw_shownormal);					


leider passiert hier gar nix (nicht mal die exe startet)... :-(

mit

ausblenden Delphi-Quelltext
1:
shellexecute(application.handle, 'open''c:\001\test.exe','','',sw_shownormal);					


startet zwar die exe, aber ich hab ja keinen parameter(Variable) übergeben...


hilfe...danke
christoph


Moderiert von user profile iconTino: Topic aus CLX / Delphi Language (Object-Pascal) verschoben am Di 08.03.2005 um 14:24
Moderiert von user profile iconTino: Titel geändert.
matze.de
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 576

Win95, Win98 SE, WinXp Prof SP2
D7P, D8P, FPC2.0
BeitragVerfasst: Di 08.03.05 14:47 
schonmal bei msdn geguckt?

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
HINSTANCE ShellExecute(      
    HWND hwnd,
    LPCTSTR lpOperation,
    LPCTSTR lpFile,
    LPCTSTR lpParameters,
    LPCTSTR lpDirectory,
    INT nShowCmd
);


der 4 parameter wo du beim 2. Beispiel '' stehen hast, da gehört der parameter rein.

mfg matze

P.S.: Ich würde auch "LPCTSTR lpDirectory", also den Ordner wo die exe liegt, angeben, denn ich hatte schonmal das problem dass dann Quake3 nicht gestartet ist :)

_________________
si tacuisses, philosophus mansisses.
Christoph Englmann Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 276



BeitragVerfasst: Di 08.03.05 15:13 
danke, ich dachte immer das bezieht sich immer nur auf ausführbare parameter (steht auch so in der Hilfe) und die variablen muessen woanders übergeben werden...


christoph
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Di 08.03.05 15:26 
Was hat das Thema in dieser Sparte zu suchen? :gruebel: Außerdem kann man im Titel auch die Umschalttaste benutzen. ;-)