Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unable to use WinExec
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00092940
Message ID:
00092971
Vues:
33
>>>Why not just use DO instead?
>>
>>I need to create an independent process for the EXE. When the program is about to terminate, it launches another occurrance of itself. That is why I need to use WinExec, CreateProcess, or ShellExecute.
>>
>>I was never able to use DECLARE to define ShellExecute. It said it could not find the entry point in the DLL, but that is another story.
>>
>>I guess my question is can I do WinExec(SYS(16, 0), 1). It works on NT 4.0 but not on Windows 95. Does it make any difference that I compiled the EXE on NT? I am running the EXE from a NetWare 4.x server.
>>
>>Thanks!
>
>Well, WinExec is included for backward compatibility. As far as ShellExecute() it sounds like you're using:
>
DECLARE INTEGER ShellExecute IN Win32API
>rather than:
>
DECLARE INTEGER ShellExecute IN Shell32
>The Shell32.DLL is not considered part of the Win32API. I have no idea why, but it isn't. There's a thread today with the proper full declaration.

I tried the ShellExecute from my Command window and now that works. But, I still have doubts on whether that will work any better than WinExec or CreateProcess. Do you know of any reason why I would get the error while doing a WinExec or CreateProcess? Does the fact that I compiled the EXE on Windows NT make a difference?

Thanks!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform