Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DECLARE - DLL
Message
 
À
23/03/1998 15:06:40
Dan Thomas
ACS Firehouse Solutions
Urbandale, Iowa, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00086514
Message ID:
00086527
Vues:
20
>Is it best to declare all api functions I will be using "up-front" in the app, or only declare them as I need to? I have a winapi class, and am declaring all my api functions in the class init code. I could move the individual declares to the appropriate methods but then the declare would execute each time the method was called. I am declaring a bunch of functions (roughly 20 or so). Any comments/suggestions?

I'd say it depends on the usage. If the class were to be created, used and released within a small area of code (where no external calls could release clear DLLs), then .Init is fine. However, if you were going to retrieve values from the registry at the beginning of a program, and write new ones out before termination, you might want to have the declarations of the necessary functions with individual procedures and functions. That way, if somewhere else, CLEAR DLLS was issued, your program would proceed without problem.
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform