AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Win32/Win64 API (native code) ShellExecute liefert ERROR_ACCESS_DENIED
Thema durchsuchen
Ansicht
Themen-Optionen

ShellExecute liefert ERROR_ACCESS_DENIED

Ein Thema von Amateurprofi · begonnen am 23. Dez 2017 · letzter Beitrag vom 17. Jan 2018
Antwort Antwort
Seite 2 von 3     12 3      
EdAdvokat

Registriert seit: 1. Mai 2016
Ort: Berlin
414 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#11

AW: ShellExecute liefert ERROR_ACCESS_DENIED

  Alt 23. Dez 2017, 16:02
Danke Delphin.Arium, so funktioniert es nun nur so als Test für mich:
Delphi-Quellcode:
 Pos1:=(edt1.text);
    Pos2:=(edt2.text);
    Pos3:=(edt3.text);

    sUrl := Format('https://www.google.de/maps/@%s,%s,%sz', [Pos1, Pos2, Pos3]);
   ShellExecute(0,'open',PChar(sUrl),nil,nil,SW_SHOWDEFAULT);
nochmals Danke
Norbert
  Mit Zitat antworten Zitat
Amateurprofi

Registriert seit: 17. Nov 2005
Ort: Hamburg
1.041 Beiträge
 
Delphi XE2 Professional
 
#12

AW: ShellExecute liefert ERROR_ACCESS_DENIED

  Alt 23. Dez 2017, 17:37
Hallo Klaus (Amateurprofi), wie ruft Du ShowGoogleMaps auf? Ich wollte das Ganze mal ausprobieren mit einem Button und einem edit-Feld auf einer Form.
Die Geoposition wollte ich in das edit-Feld eintragen (welches Format haben diese?) und dann wollte ich per Button diese Pos. in GoogleMaps suchen lassen.
Irgendwie scheitere ich bei der Übergabe von (GP:TGeopos). Ich selle mich wohl zu blöd dazu an.
Wie in #1 gezeigt ist TGeoPos ein Record der die Felder Latitude und Longitude hat und diesen Record übergebe ich an ShowGoogleMaps.

Zum Beispiel:

var GP:TGeoPos;
begin
GP.Latituder:=50;
GP.Longitude:=10;
ShowGoogleMaps(GP);
end;

Das mache ich aber nur so, weil die Koordinaten ohnehin in dieser Form in meinem Programm vorliegen.
aber es spricht auch nichts dagegen die Prozedur z.B. so zu definieren
Procedure ShowGoogleMaps(GP:String);
und GP direkt aus deinem Edit zu übernehmen.
Dann sollte das Edit z.B. "53.567000,10.033000" enthalten, also Breitengrad und Längengrad durch ein Komma getrennt.
Im ShellExcute übergebe ich dann als Filename z.B. "http://maps.google.de/maps?q=53.567000,10.033000&z=12"
Gruß, Klaus
Die Titanic wurde von Profis gebaut,
die Arche Noah von einem Amateur.
... Und dieser Beitrag vom Amateurprofi....
  Mit Zitat antworten Zitat
Amateurprofi

Registriert seit: 17. Nov 2005
Ort: Hamburg
1.041 Beiträge
 
Delphi XE2 Professional
 
#13

AW: ShellExecute liefert ERROR_ACCESS_DENIED

  Alt 23. Dez 2017, 17:58
Achtung. Die X86-64 FPU hat keine Unterstützung mehr für 80-Bit Floats (Extended). Entweder wird unter 64-Bit also emuliert, was fürchterlich langsam sein wird, oder deine Werte werden einfach truncated.
Meine 64Bit CPU beinhaltet eine FPU, die 80-Bit Floats verarbeitet.
Da wird nichts emuliert oder fürchterlich langsam oder einfach truncated.
Aber: Delphi, im 64Bit Modus, unterstützt die FPU nicht mehr.
Gruß, Klaus
Die Titanic wurde von Profis gebaut,
die Arche Noah von einem Amateur.
... Und dieser Beitrag vom Amateurprofi....
  Mit Zitat antworten Zitat
Benutzerbild von Bernhard Geyer
Bernhard Geyer

Registriert seit: 13. Aug 2002
17.171 Beiträge
 
Delphi 10.4 Sydney
 
#14

AW: ShellExecute liefert ERROR_ACCESS_DENIED

  Alt 23. Dez 2017, 18:10
Achtung. Die X86-64 FPU hat keine Unterstützung mehr für 80-Bit Floats (Extended). Entweder wird unter 64-Bit also emuliert, was fürchterlich langsam sein wird, oder deine Werte werden einfach truncated.
Meine 64Bit CPU beinhaltet eine FPU, die 80-Bit Floats verarbeitet.
Da wird nichts emuliert oder fürchterlich langsam oder einfach truncated.
Aber: Delphi, im 64Bit Modus, unterstützt die FPU nicht mehr.
Gibt es irgendwelche Systeme die 80-Bit im 64-Modus unterstützen?

Die Kommentare im Lazarus-Forums sind hier ganz gut (http://forum.lazarus.freepascal.org/...?topic=29678.0)

Zitat:
The logic behind it is that the previous 80bit float is supported on the 32bit intel instruction set, but NOT on the 64bit AMD/Intel instruction set, so you would have to revert to soft float anyway. Technically one could use the FPU87 instruction set but it will conflict with the more modern fp units in that they use the same register space, i.e. you can use 1 and loose the benefits of the other.
Windows Vista - Eine neue Erfahrung in Fehlern.
  Mit Zitat antworten Zitat
Amateurprofi

Registriert seit: 17. Nov 2005
Ort: Hamburg
1.041 Beiträge
 
Delphi XE2 Professional
 
#15

AW: ShellExecute liefert ERROR_ACCESS_DENIED

  Alt 24. Dez 2017, 14:57
Achtung. Die X86-64 FPU hat keine Unterstützung mehr für 80-Bit Floats (Extended). Entweder wird unter 64-Bit also emuliert, was fürchterlich langsam sein wird, oder deine Werte werden einfach truncated.
Meine 64Bit CPU beinhaltet eine FPU, die 80-Bit Floats verarbeitet.
Da wird nichts emuliert oder fürchterlich langsam oder einfach truncated.
Aber: Delphi, im 64Bit Modus, unterstützt die FPU nicht mehr.
Gibt es irgendwelche Systeme die 80-Bit im 64-Modus unterstützen?

Die Kommentare im Lazarus-Forums sind hier ganz gut (http://forum.lazarus.freepascal.org/...?topic=29678.0)

Zitat:
The logic behind it is that the previous 80bit float is supported on the 32bit intel instruction set, but NOT on the 64bit AMD/Intel instruction set, so you would have to revert to soft float anyway. Technically one could use the FPU87 instruction set but it will conflict with the more modern fp units in that they use the same register space, i.e. you can use 1 and loose the benefits of the other.
Weiß nicht, on irgendwelche Systeme die 80-Bit im 64-Modus unterstützen.
Das ist in diesem Zusammenhang auch irrelevant, denn es ging nicht um die Frage ob irgendwelche Systeme die im 64 Bit Mode unterstützen, sondern darum ob eine X86-64 FPU sie unterstützt.
Und meine tut das! Wie das bei den neuesten CPUs ist weiß ich nicht.
Auch der obige Kommentar aus dem Lazarus Forum scheint mir fehlerhaft zu sein.
Im "Intel® 64 and IA-32 Architectures Software Developer’s Manual Volume 2A: Instruction Set Reference, A-M" steht z.B. für die FPU-Instruction FCOS (Cosinus berechnen):

Opcode = D9 FF
Instruction = FCOS
64-Bit Mode = Valid
Compat/Leg Mode = Valid
Description = Replace ST(0) with its cosine.

Also auch im 64 Bit Mode gültig, und das gilt für alle FPU-Befehle.
Die Aussage "Technically one could use the FPU87 instruction set but it will conflict with the more modern fp units in that they use the same register space" ist nur bedingt richtig.
Richtig ist, dass die FPU-Register und die 64 Bit MMX-Register den gleichen Adressraum belegen.
Richtig ist aber auch dass das bei den 128Bit XMM-Registern NICHT der Fall ist, d.h. FPU- und SSE-Register sind voneinander getrennt.
Gruß, Klaus
Die Titanic wurde von Profis gebaut,
die Arche Noah von einem Amateur.
... Und dieser Beitrag vom Amateurprofi....
  Mit Zitat antworten Zitat
Fukiszo
(Gast)

n/a Beiträge
 
#16

AW: ShellExecute liefert ERROR_ACCESS_DENIED

  Alt 15. Jan 2018, 11:48
falls das weiterhelfen kann, hier meine funktionen um etwas zu laden/starten:
sorry, ich habs nur in englisch kommentiert.

viel spass damit.

Delphi-Quellcode:
// this is my oldschool Execution function from MS-DOS now "Windownized" ;-)
// Similar as if you would execute anything on Command-Line
// Result will be greater than 31 on success
// if result is 4294967295/$FFFFFFFF than its a general error
// Example: if ExecuteCommandLine('C;\WINDOWS\TEMP\FILENAME.EXE', False) > 31 then Success := True else Success := False;
Function ExecuteCommandLine(const cmdLine: string; const ShowConsole: Boolean): Cardinal;
const
  flags: array [Boolean] of Integer = (SW_HIDE, SW_SHOWNORMAL);
var
  cmdbuffer: array [0..MAX_PATH] of Char;
begin
 Result := Cardinal($FFFFFFFF);
 GetEnvironmentVariable('COMSPEC', cmdBUffer, SizeOf(cmdBuffer));
 StrCat(cmdbuffer, ' /C ');
 StrPCopy(StrEnd(cmdbuffer), cmdLine);
 Result := WinExec(cmdbuffer, flags[ShowConsole]);
end;

// this is my "ShellExecuteEx" implementation
// Example:
// to run something type
// ExecuteShell('C;\Windows\Temp\FileName.exe','Parameters',False,False);
// to run something type and wait that it finish type
// ExecuteShell('C;\Windows\Temp\FileName.exe','-Parameters',False,True);
// ShowConsole should only be activated for Console Programs
// Returned Value is either ErrorCode from ShellExecuteEx or Init/Exit Code from "Executable"
// if result is 4294967295/$FFFFFFFF than its a general error
function ExecuteShell(const Executable, Commands: String; const ShowConsole, DoWait: Boolean): Cardinal;
 var
  ProcessInfo: TShellExecuteInfo;
 begin
  Result := Cardinal($FFFFFFFF);
  FillChar(ProcessInfo, SizeOf(TShellExecuteInfo), #0);
  with ProcessInfo do
  begin
   cbSize:= SizeOf( TShellExecuteInfo );
   fMask := SEE_MASK_NOCLOSEPROCESS or SEE_MASK_FLAG_DDEWAIT;
   Wnd := GetActiveWindow();
   lpVerb := 'open';
(* lpVerb can be one of this:
    'edit'  Launches an editor and opens the document for editing.
    'explore' Explores the folder specified by lpFile.
    'find' Initiates a search starting from the specified directory.
    'open' Opens the file, folder specified by the lpFile parameter.
    'print' Prints the document file specified by lpFile.
    'properties' Displays the file or folder's properties.*)

   lpFile:= PChar(Executable);
   lpParameters := PChar(Commands);
   lpDirectory := PChar(ExtractFilePath(Executable));
   if ShowConsole then nShow := SW_SHOWNORMAL else nShow := SW_HIDE;
  end;
  if ShellExecuteEx(@ProcessInfo) then
  begin
// if DoWait then WaitForSingleObject(ProcessInfo.hProcess, INFINITE);
   if DoWait then while WaitForSingleObject(ProcessInfo.hProcess, 500) <> WAIT_OBJECT_0 do ProcessMessages;
   if not GetExitCodeProcess(ProcessInfo.hProcess, Result) then Result := Cardinal($FFFFFFFF);
// GetExitCodeProcess(ProcessInfo.hProcess, Result);
   CloseHandle(ProcessInfo.hProcess);
  end
  else
  begin
   Result := GetLastError;
   exit;
  end;
 end;

// this function execute any Associated Program with "Executable" as Input-Filename optional wait that it finish
// give back as Result the Init/Exit Code of Associated Program or Error Code from FindExecutable
// Example: ExecuteAssociated('ReadMe.txt', False, True);
// that would open "ReadMe.txt" in Editor and wait that Editor terminate
// ExecuteAssociated('ReadMe.html', False, False);
// that would open your Internet Browser with "ReadMe.html" and not wait
// ShowConsole should only be activated for Console Programs
// if result is 4294967295/$FFFFFFFF than its a general error
function ExecuteAssociated(const Executable: String; const ShowConsole, DoWait: Boolean): Cardinal;
var
  Prg: string;
  Security : TSecurityAttributes;
  ProcessInfo: TProcessInformation;
  StartupInfo: TStartupInfo;
 begin
  Result := Cardinal($FFFFFFFF);
  SetLength(Prg, MAX_PATH);
  Result := FindExecutable(PChar(Executable), nil, PChar(Prg));
  if Result > 32 then
  begin
   with Security do begin
    nLength := SizeOf(TSecurityAttributes);
    lpSecurityDescriptor := nil;
    bInheritHandle := False;
   end;
   SetLength(Prg, StrLen(PChar(Prg)));
   FillChar(StartupInfo, SizeOf(TStartupInfo), #0);
   with StartupInfo do
   begin
    cb := SizeOf(TStartupInfo);
    dwFlags := STARTF_USESHOWWINDOW or STARTF_FORCEONFEEDBACK;
    if ShowConsole then wShowWindow := SW_SHOWNORMAL else wShowWindow := SW_HIDE;
   end;
   if CreateProcess(PChar(Prg), PChar(Format('%s %s', [Prg, Executable])), @Security, @Security, False, CREATE_NEW_CONSOLE or NORMAL_PRIORITY_CLASS, nil, PChar(ExtractFilePath(Executable)), StartupInfo, ProcessInfo) then
   begin
    if DoWait then while WaitForSingleObject(ProcessInfo.hProcess, 500) <> WAIT_OBJECT_0 do ProcessMessages;
// if DoWait then WaitForSingleObject(ProcessInfo.hProcess, INFINITE);
    if not GetExitCodeProcess(ProcessInfo.hProcess, Result) then Result := Cardinal($FFFFFFFF);
// GetExitCodeProcess(ProcessInfo.hProcess, Result);
    CloseHandle(ProcessInfo.hProcess);
    CloseHandle(ProcessInfo.hThread);
   end
   else
    Result := GetLastError;
  end;
 end;

// this function execute any Executable with Commands optional wait that it finish
// give back as Result the Init/Exit Code of Executable or Error Code from CreateProcess
// example:
// to execute a executable type
// ExecuteExe('C:\WINDOWS\TEMP\FILENAME.EXE','Parameters',False,False);
// to execute a executable and wait type
// ExecuteExe('C:\WINDOWS\TEMP\FILENAME.EXE','Parameters',False,True);
// ShowConsole should only be activated for Console Programs
// DoWait will AntiFreeze and Lock your visible GUI
// this way you could still Update Display in your Application (like a text scroller, or any graphic etc)
// SideEffect: All commands that you click/do/set while in DoWait mode,
// will be executed at once when DoWait is finished.
// if result is 4294967295/$FFFFFFFF than its a general error
// Result can be Init/Exit Code of Executable
function ExecuteExe(const Executable: String; Commands: String; const ShowConsole, DoWait: Boolean): Cardinal;
  procedure WaitFor(processHandle: THandle);
  var
    Msg: TMsg;
    ret: DWORD;
  begin
    repeat
      ret := MsgWaitForMultipleObjects(1, { 1 handle to wait on }
              processHandle, { the handle }
              False, { wake on any event }
              INFINITE, { wait without timeout }
              QS_PAINT or { wake on paint messages }
              QS_SENDMESSAGE { or messages from other threads }
             );
      if ret = WAIT_FAILED then Exit; { can do little here }
      if ret = (WAIT_OBJECT_0 + 1) then
      begin
// if Msg.Message = WM_COMMAND then begin Msg.Message := WM_NULL end else
      while PeekMessage(Msg, 0, WM_PAINT, WM_PAINT, PM_REMOVE) do
// while PeekMessage(Msg, 0, WM_NULL, WM_USER, PM_REMOVE) do (* this would total un-freeze = DoWait would not lock GUI *)
          DispatchMessage(Msg);
      end;
    until ret = WAIT_OBJECT_0;
  end; { Waitfor }
var
  Security : TSecurityAttributes;
  StartupInfo: TStartupInfo;
  ProcessInfo: TProcessInformation;
begin
 Result := Cardinal($FFFFFFFF);
 if ((Length(Commands) > 1)and(Commands[1]<>' ')) then Commands := ' ' + Commands;
 with Security do begin
   nLength := SizeOf(TSecurityAttributes);
   lpSecurityDescriptor := nil;
   bInheritHandle := False;
 end;
  FillChar(StartupInfo, SizeOf(StartupInfo), #0);
  StartupInfo.cb := SizeOf(StartupInfo);
  StartupInfo.dwFlags := STARTF_USESHOWWINDOW or STARTF_FORCEONFEEDBACK;
  if ShowConsole then StartupInfo.wShowWindow := SW_SHOWNORMAL else StartupInfo.wShowWindow := SW_HIDE;
  if CreateProcess(PChar(Executable), PChar(Commands), @Security, @Security, False, CREATE_NEW_CONSOLE or NORMAL_PRIORITY_CLASS, nil, PChar(ExtractFilePath(Executable)), StartupInfo, ProcessInfo) then
  begin
   if DoWait then WaitFor(ProcessInfo.hProcess);
   if not GetExitCodeProcess(ProcessInfo.hProcess, Result) then Result := Cardinal($FFFFFFFF);
// GetExitCodeProcess(ProcessInfo.hProcess, Result);
// if Result = 0 then Result := STATUS_PENDING;
    CloseHandle(ProcessInfo.hThread);
    CloseHandle(ProcessInfo.hProcess);
  end
  else
    Result := GetLastError;
end;

// this function will execute a console application
// give all console output back to "Output:PChar" parameter
// give back as Result the ExitCode of "Executable"
// ShowConsole should only be activated if you want to see a blank Console Window aslong Process is running
// WARNING: DO NOT EXECUTE CONSOLE APPLICATIONS THAT NEED KEYBOARD/MOUSE INPUT!!!
// if result is 4294967295/$FFFFFFFF than its a general error
Function ExecuteConsole(const Executable: String; Commands: String; const ShowConsole: Boolean; var Output: PChar): Cardinal;
const
 ReadBuffer = 4000;
var
  Security : TSecurityAttributes;
  ReadPipe,WritePipe : THandle;
  StartupInfo : TStartUpInfo;
  ProcessInfo : TProcessInformation;
  Buffer : Pchar;
  BytesRead : DWord;
  AppRunning : DWord;
begin
 Result := Cardinal($FFFFFFFF);
 if ((Length(Commands) > 1)and(Commands[1]<>' ')) then Commands := ' ' + Commands;
 with Security do begin
  nLength := SizeOf(TSecurityAttributes);
  lpSecurityDescriptor := nil;
  bInheritHandle := True;
 end;
 if CreatePipe (ReadPipe, WritePipe, @Security, 0) then
 begin
  Buffer := AllocMem(ReadBuffer + 1);
  FillChar(StartupInfo,SizeOf(StartupInfo), #0);
  StartupInfo.cb := SizeOf(StartupInfo);
  StartupInfo.hStdOutput := WritePipe;
  StartupInfo.hStdInput := ReadPipe;
  StartupInfo.dwFlags := STARTF_USESTDHANDLES or STARTF_USESHOWWINDOW;
  if ShowConsole then StartupInfo.wShowWindow := SW_SHOWNORMAL else StartupInfo.wShowWindow := SW_HIDE;
  if CreateProcess(PChar(Executable), PChar(Commands), @Security, @Security, True, CREATE_NEW_CONSOLE or NORMAL_PRIORITY_CLASS, nil, PChar(ExtractFilePath(Executable)), StartupInfo, ProcessInfo) then
  begin
   repeat
    ProcessMessages;
    Apprunning := WaitForSingleObject(ProcessInfo.hProcess,100);
   until (Apprunning <> WAIT_TIMEOUT);
// if DoWait then while WaitForSingleObject(ProcessInfo.hProcess, 500) <> WAIT_OBJECT_0 do ProcessMessages;
   repeat
    BytesRead := 0;
    ReadFile(ReadPipe,Buffer[0], ReadBuffer, BytesRead,nil);
    Buffer[BytesRead]:= #0;
   OemToChar(Buffer, Output);
   until (BytesRead < ReadBuffer);
   end;
  FreeMem(Buffer);
  if not GetExitCodeProcess(ProcessInfo.hProcess, Result) then Result := Cardinal($FFFFFFFF);
// GetExitCodeProcess(ProcessInfo.hProcess, Cardinal(Result));
  CloseHandle(ReadPipe);
  CloseHandle(WritePipe);
  CloseHandle(ProcessInfo.hThread);
  CloseHandle(ProcessInfo.hProcess);
 end;
end;

Geändert von Fukiszo (15. Jan 2018 um 11:59 Uhr)
  Mit Zitat antworten Zitat
Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
43.132 Beiträge
 
Delphi 12 Athens
 
#17

AW: ShellExecute liefert ERROR_ACCESS_DENIED

  Alt 15. Jan 2018, 12:13
Zitat von MSDN - WinExec:
Note This function is provided only for compatibility with 16-bit Windows. Applications should use the CreateProcess function.
Und ich könnte wetten, dass der Compiler hier ein paar Meldungen anzeigt, die jemand vergessen hat zu beheben.
> mindesten "Auf 'ExecuteCommandLine' zugewiesener Wert wird niemals benutzt"
> und seit Delphi 2009 wird es in ExecuteConsole bestimmt Meldungen bezüglich Unicode geben
Garbage Collector ... Delphianer erzeugen keinen Müll, also brauchen sie auch keinen Müllsucher.
my Delphi wish list : BugReports/FeatureRequests

Geändert von himitsu (15. Jan 2018 um 12:17 Uhr)
  Mit Zitat antworten Zitat
Fukiszo
(Gast)

n/a Beiträge
 
#18

AW: ShellExecute liefert ERROR_ACCESS_DENIED

  Alt 15. Jan 2018, 12:38
Falls etwas mit meinem code nicht stimmen sollte, ich bin offen für Kritik
Ich nutz leider keine IDE um mir solche Meldungen anzuschauen,
ich programmier meist mit Notepad++, reicht aus für meine kleinen belange hehe
Ich hab den source mit/für Delphi 7 erschaffen, wie andere Delphi varianten reagieren weiss ich nicht und kann ich auch nicht testen, tut mir leid.
Für delphi 7 taugt der code, hat mich noch nie im stich gelassen.
WinExec ist rückwärtskompatibel, ja. Ich verstehe das zitat nicht.
Es sind ja mehrere varianten vorhanden, man kann entscheiden wie was ausgeführt wird.
Falls ich ein totes überbleibsel aus test zeiten vergessen hab zu löschen, verzeih #zwei
  Mit Zitat antworten Zitat
Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
43.132 Beiträge
 
Delphi 12 Athens
 
#19

AW: ShellExecute liefert ERROR_ACCESS_DENIED

  Alt 15. Jan 2018, 13:37
Bis auf das Unicodeproblem, was aber zufällig keinen Bufferoverflow erzeugt, sondern eher einen Bufferunderflow, sah ich eine direkten "schwerwiegenden" Fehler.
OK, abgesehn von einer Funktion (WinExex), welche seit 23 Jahren als "nicht verwenden, nur für Abwärtskompatibilität von uraltem Code" gekennzeichnet ist.

In ExecuteConsole wird ab D2009 halt ANSI in einem Unicode-CharArray gespeichert wird, was so kaum stört, aber OemToChar wird meckern, vonwegen potentiellem Datenverlust, weil es ja einen PAnsiChar haben will, aber einen PChar/PWideChar bekommt. (der Compiler weiß nunmal nicht, dass dort wirklich nur ANSI drin ist, durch den vorherigen Fehler beim Befüllen).

Zitat:
Für delphi 7 taugt der code, hat mich noch nie im stich gelassen.
Problem ist halt, dass schon seit 9 Jahren Delphi standardmäßig mit Unicode arbeitet, was in der EDV gefühlt einem halben Jahrhundert entspricht.
Vorallem Codes, welche Andere verwenden sollen, wären gut beraten, wenn sie mit halbwegs aktuellen Delphiversionen zusammen arbeiten.
Tipp zum Testen: https://www.embarcadero.com/de/products/delphi/starter


PS: Wäre vor Jahrzehnten schon AnsiChar statt Char dort verwendet worden, wo explizit ANSI genutzt wird, dann hätte es dieses Problem nicht gegeben.
Sowas war eines der größten Gründe, welche bei Einführung von Delphi 2009 in vielen AltCodes zu Problemen führte.
> immer die "richtigen" Typen verwenden und schon minimieren sich die potentiellen Fehlerstellen.
Garbage Collector ... Delphianer erzeugen keinen Müll, also brauchen sie auch keinen Müllsucher.
my Delphi wish list : BugReports/FeatureRequests

Geändert von himitsu (15. Jan 2018 um 13:52 Uhr)
  Mit Zitat antworten Zitat
Fukiszo
(Gast)

n/a Beiträge
 
#20

AW: ShellExecute liefert ERROR_ACCESS_DENIED

  Alt 15. Jan 2018, 15:38
UniCode, guter Rat kommt schnell, vielen Dank, das lässt sich ja problemlos justieren/nachrüsten,
zum beispiel mit einer "if compiler version >= XYZ" then pAnsiChar anstelle pChar direktive.

Danke für den Link, auf arbeit kann ich mit RADStudio XE 10.2 compilieren, ich sollt mal meine privaten codes damit checken,
danke nochmals für den Hinweis.

Für meine privaten Zwecke erstellt mir Delphi ab Version über 7 viel zu grosse Dateien (dateigröße),
deshalb bleib ich privat bei 7 und programmiere privat auch nur damit.

WinExec:
Nur weil was nicht benutzt werden sollte, sollte doch zumindest die möglichkeit gezeigt werden das solch eine funktion existiert
bzw. wie man diese veraltete funktion in der jetzt-zeit dennoch erfolgreich einsetzen könnte, oder etwa nicht?
Delphi 7 hat halt die definition in der Windows.pas datei, ich zeig wie man sie einsetzten könnte.

Danke für deine draufsicht ob fehler existieren!!!
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 2 von 3     12 3      


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 07:32 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