AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Shellexecute

Ein Thema von SilverMoonGirl · begonnen am 13. Jan 2004 · letzter Beitrag vom 13. Jan 2004
Antwort Antwort
Seite 2 von 6     12 34     Letzte »    
Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#11

Re: Shellexecute

  Alt 13. Jan 2004, 13:16
was gibt Shelleexecute zurück:
Zitat von PSDK:
Return Value

Returns a value greater than 32 if successful, or an error value that is less than or equal to 32 otherwise. The following table lists the error values. The return value is cast as an HINSTANCE for backward compatibility with 16-bit Windows applications. It is not a true HINSTANCE, however. The only thing that can be done with the returned HINSTANCE is to cast it to an int and compare it with the value 32 or one of the error codes below.

0 The operating system is out of memory or resources.
ERROR_FILE_NOT_FOUND The specified file was not found.
ERROR_PATH_NOT_FOUND The specified path was not found.
ERROR_BAD_FORMAT The .exe file is invalid (non-Microsoft Win32® .exe or error in .exe image).
SE_ERR_ACCESSDENIED The operating system denied access to the specified file.
SE_ERR_ASSOCINCOMPLETE The file name association is incomplete or invalid.
SE_ERR_DDEBUSY The Dynamic Data Exchange (DDE) transaction could not be completed because other DDE transactions were being processed.
SE_ERR_DDEFAIL The DDE transaction failed.
SE_ERR_DDETIMEOUT The DDE transaction could not be completed because the request timed out.
SE_ERR_DLLNOTFOUND The specified dynamic-link library (DLL) was not found.
SE_ERR_FNF The specified file was not found.
SE_ERR_NOASSOC There is no application associated with the given file name extension. This error will also be returned if you attempt to print a file that is not printable.
SE_ERR_OOM There was not enough memory to complete the operation.
SE_ERR_PNF The specified path was not found.
SE_ERR_SHARE A sharing violation occurred.
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat
Benutzerbild von Matze
Matze
(Co-Admin)

Registriert seit: 7. Jul 2003
Ort: Schwabenländle
14.929 Beiträge
 
Turbo Delphi für Win32
 
#12

Re: Shellexecute

  Alt 13. Jan 2004, 13:16
Bei Garby musst du den '\' auch weglassen.
  Mit Zitat antworten Zitat
Benutzerbild von SilverMoonGirl
SilverMoonGirl

Registriert seit: 21. Aug 2003
Ort: Berlin
160 Beiträge
 
Delphi 6 Professional
 
#13

Re: Shellexecute

  Alt 13. Jan 2004, 13:17
funktioniert leider auch nicht bei mir;-(((((((
@ therian
Simone
There is no dark side of the moon really.
Matter of fact it's all dark.
.::mein Blog::.
  Mit Zitat antworten Zitat
tHeRiAn

Registriert seit: 16. Okt 2003
Ort: Neunkirchen, Siegerland
51 Beiträge
 
Delphi 5 Enterprise
 
#14

Re: Shellexecute

  Alt 13. Jan 2004, 13:18
sorry
hab grad nen fehler ausgemerzt....

therian
  Mit Zitat antworten Zitat
Benutzerbild von Matze
Matze
(Co-Admin)

Registriert seit: 7. Jul 2003
Ort: Schwabenländle
14.929 Beiträge
 
Turbo Delphi für Win32
 
#15

Re: Shellexecute

  Alt 13. Jan 2004, 13:22
Also, das geht zu 100%:

ShellExecute(Form1.Handle, 'open', pchar(ExtractFilePath(ParamStr(0)) + 'ADRESS.exe'), nil, nil, SW_SHOW);
  Mit Zitat antworten Zitat
Benutzerbild von SilverMoonGirl
SilverMoonGirl

Registriert seit: 21. Aug 2003
Ort: Berlin
160 Beiträge
 
Delphi 6 Professional
 
#16

Re: Shellexecute

  Alt 13. Jan 2004, 13:22
@matze den "/" hatte ich schon rausgelassen
Simone
There is no dark side of the moon really.
Matter of fact it's all dark.
.::mein Blog::.
  Mit Zitat antworten Zitat
choose

Registriert seit: 2. Nov 2003
Ort: Bei Kiel, SH
729 Beiträge
 
Delphi 2006 Architect
 
#17

Re: Shellexecute

  Alt 13. Jan 2004, 13:22
Hallo SilverMoonGirl,

die Funktion ShellExecute zeigt Dir keine Fehlermeldung an (wirft keine Exception) sondern hat spezielle Rückgabewert, um ein Problem zu signalisieren.

Falls den Fehlerfall trotzdem durch eine delphi-typische Exception abbilden möchtest, könntest Du folgendes Probieren:
Delphi-Quellcode:
if ShellExecute(...) <= 32 then
  RaiseLastOSError;
Die Fehlermeldung sollte Dir nun anzeigen, wo das Problem liegt.
gruß, choose
  Mit Zitat antworten Zitat
Benutzerbild von Matze
Matze
(Co-Admin)

Registriert seit: 7. Jul 2003
Ort: Schwabenländle
14.929 Beiträge
 
Turbo Delphi für Win32
 
#18

Re: Shellexecute

  Alt 13. Jan 2004, 13:27
Zitat von SilverMoonGirl:
@matze den "/" hatte ich schon rausgelassen
Es ist ein '\'

Aber ich hab noch mehr verändert z.B.: Form1.handle
  Mit Zitat antworten Zitat
WtF

Registriert seit: 24. Nov 2003
Ort: Nähe München
72 Beiträge
 
FreePascal / Lazarus
 
#19

Re: Shellexecute

  Alt 13. Jan 2004, 13:33
lol
Alle posten wie wild wenn mal eine Programmiererin eine Frage stellt - echt cool.
Hast du es jetzt eigentlich hinbekommen @SilverMoonGirl
Mfg
Steffen
Was meinst du als unbeteiligter eigentlich zum Thema Intelligenz ? Keep it real, Respect!
  Mit Zitat antworten Zitat
Benutzerbild von SilverMoonGirl
SilverMoonGirl

Registriert seit: 21. Aug 2003
Ort: Berlin
160 Beiträge
 
Delphi 6 Professional
 
#20

Re: Shellexecute

  Alt 13. Jan 2004, 13:35
@all vielen Dank erstmal für eure Hilfe, funktioniert aber trotzdem nicht, oder muss ich da noch was anderes beachten(shellapi hab ich schon eingebunden)
Simone
There is no dark side of the moon really.
Matter of fact it's all dark.
.::mein Blog::.
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 2 von 6     12 34     Letzte »    


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 08:05 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz