Forum: Win32/Win64 API (native code)
by Luckie,
17. Sep 2010
Also so:
procedure GetCommandLineArgs(Args: TStrings);
type
TPWideCharArray = array of PWideChar;
var
NumArgs: Integer;
TempArgs: PPWideChar;
i: Integer;
begin
TempArgs := CommandLineToArgvW(GetCommandLineW, NumArgs);
Forum: Win32/Win64 API (native code)
by Luckie,
17. Sep 2010
Ok, danke für die Erklärung.
Forum: Win32/Win64 API (native code)
by Luckie,
17. Sep 2010
Das heißt, dieser Code
http://www.michael-puff.de/Programmierung/Delphi/Code-Snippets/CommandLineToArgvW.shtml
verursacht Speicherlücken? Wo entstehen diese denn?
Forum: Win32/Win64 API (native code)
by Luckie,
17. Sep 2010
Hm, OK. Dann habe ich nur den Zugriff versemmelt. ;)
Ja mit PPWideCharArray funktioniert es bei mir auch, nur ich wollte ohne die zusätzliche Deklaration auskommen.
Forum: Win32/Win64 API (native code)
by Luckie,
17. Sep 2010
Danke funktioniert. Aber warum? Kannst du mir das auch noch erklären?
Forum: Win32/Win64 API (native code)
by Luckie,
17. Sep 2010
Folgender Code:
//type
//TPWideCharArray = array of PWideChar;
//PPWideCharArray = ^TPWideCharArray;
//function CommandLineToArgvW( lpCmdLine: PWideChar; var NumArgs: Integer): PPWideChar;
//stdcall; external 'shell32.dll';
procedure GetCommandLineArgs(Args: TStrings);
var