Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is there a way to open VFP's *.EXE himself without erro
Message
De
28/07/2001 14:37:53
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
 
À
28/07/2001 03:22:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00536810
Message ID:
00536881
Vues:
10
>I'm owner of VS 6.0 and most used tools from them is VFP 6 (at least, post of Mr. L.Miller about transparency forms in VFP etc. was one of the main reason to buy this version, thanks Larry :-) ). With VFP I working almost 5 years and I'm find out I'm enough good to use it. I'm incurious to know is there a way that with VFP produced *.EXE could open himself without error and write something inside? For example, let I have got an "File HexEditor" written in VFP 5 or 6. I like to open this EXE with himself and change something. It's impossible.
>I'm trying to solve it with usual low-lewel file function (FOPEN(.... etc..) but like result for handler of the open file is always returning -1 (error). Maybe some API call? Or...?

In general, any EXE (even on a server) is write-protected once someone is running it.

Create 2 EXE'S ... Make it so that the second EXE (the "modifier") can only be called by the "main" EXE and must be passed a "secret" parameter. Maybe the second EXE is loaded from a Memo in a table.

Have the main EXE start the second EXE; then have the second EXE go into a "wait state" for a "short period" using (maybe) INKEY() or a timer; have the "main" EXE quit.

The second EXE modifies the main EXE; it then starts the main EXE; the second EXE now quits. The main EXE (after a "short period/wait"), deletes the second EXE after having determined that "itself" was modified (otherwise it would attempt to load the second EXE, etc).

Or something like that ... :)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform