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:
00086518
Vues:
30
>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?

Like anything, I think it is a matter of preference. In your situation, I would write a class that encapsulates the the API calls. Then, in your app, where you make those API calls - make method calls to your class instead. When the class is instanced, the Init() will take care of the declares. To make things easier, yoiu may want to instance the class at the top of your app.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform