Information générale
Catégorie:
Codage, syntaxe et commandes
>Is it possible to create a compiled application (.exe) that can accept command line parameters such as a file name? If so, how do you code for this in the program?
Yes, it's possible. Your main prg must contain a PARAMETER or LPARAMETER command at its top. From there, it's like having a usual procedure. The only difference is that all parameters received by an exe are of char string type. The problem with the file names is that they may contain spaces. In this case, the operating systems considers them as separate parameters and will pass them to you as multiple parameters.
>Also, can you create an application that can be launched by dropping a file (or shortcut) icon on the application?
I never tested this, but I believe that this is done automatically in Win 95, NT.
Vlad
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement