Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Run exe with file parameter
Message
De
23/03/2006 06:11:02
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Novell 6.x
Database:
Visual FoxPro
Divers
Thread ID:
01106228
Message ID:
01106929
Vues:
24
It works fine.
Thanks a lot!
Tamas
>>The only reason is that I've never used them before but I'm interested.
>>Is there any goog help to have look at it.
>>Thanks,
>>Tamas
>>>>I would like to have an .exe file running with a file as a parameter, which should start(the exe) within a prg. But I'm always getting the same error message:"Command error". I have tried command RUN but it doesnt work.
>>>>TIA
>>>>Tamas Szigeti
>>>
>>>Is there any special reason you don't want to use ShellExecute()?
>
>
>#define SW_HIDE             0
>#define SW_NORMAL           1
>#define SW_SHOWMINIMIZED    2
>#define SW_SHOWMAXIMIZED    3
>#define SW_MAXIMIZE         3
>#define SW_SHOWNOACTIVATE   4
>#define SW_SHOW             5
>#define SW_MINIMIZE         6
>
>* Error codes return from ShellExecute
>**** regular WinExec() codes *
>#define SE_ERR_FNF              2       && file not found
>#define SE_ERR_PNF              3       && path not found
>#define SE_ERR_ACCESSDENIED     5       && access denied
>#define SE_ERR_OOM              8       && out of memory
>#define SE_ERR_DLLNOTFOUND     32
>
>* error values for ShellExecute() beyond the regular WinExec() codes
>#define SE_ERR_SHARE                    26
>#define SE_ERR_ASSOCINCOMPLETE          27
>#define SE_ERR_DDETIMEOUT               28
>#define SE_ERR_DDEFAIL                  29
>#define SE_ERR_DDEBUSY                  30
>#define SE_ERR_NOASSOC                  31
>
>
>
>DECLARE INTEGER ShellExecute IN SHELL32.DLL INTEGER nWinHandle,;
>                                             STRING cOperation,;
>                                             STRING cFileName,;
>                                             STRING cParameters,;
>                                             STRING cDirectory,;
>                                             INTEGER nShowWindow
>******lRef= 'C:\Program Files\Utvonal\Utvhatar.exe ' + 'hamiTszt.txt'
>result = ShellExecute(0, 'Open', [Utvhatar.exe] , [hamiTszt.txt], [C:\Program Files\Utvonal], SW_NORMAL)
>IF result < 33 && Some Error happens
>*   check for errors see defines above
>   *** Some error happened
>ENDIF
>
>
>(not tested)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform