Einzelnen Beitrag anzeigen

Benutzerbild von chaosben
chaosben

Registriert seit: 27. Apr 2005
Ort: Görlitz
1.358 Beiträge
 
Delphi XE2 Professional
 
#4

Re: Verknüpfung zum eigenen Programm mit Paramentern

  Alt 4. Feb 2007, 15:36


Die Antwort ist so simpel, das man kaum drauf kommt.

Zitat von Die Delphi-Hilfe ©Borland:
IShellLink::SetArguments Method
Sets the command-line arguments for a Shell link object.

Syntax
HRESULT SetArguments(LPCTSTR pszArgs);

Parameters
pszArgs
Pointer to a buffer that contains the new command-line arguments.

Return Value
Returns S_OK if successful, or an error value otherwise.

Remarks
This method is useful when creating a link to an application that takes special flags as arguments, such as a compiler.
Auf deutsch:
Man erweitere den Funktionskopf so ...
function CreateLink(const AFilename, AArgs, ALNKFilename, ADescription: String) : Boolean; ... und füge folgende Zeile ein:
psl.SetArguments(PChar(AArgs));
Benjamin Schwarze
If I have seen further it is by standing on the shoulders of Giants. (Isaac Newton)
  Mit Zitat antworten Zitat